generated from mwc/lab_weather
29 lines
1.9 KiB
Plaintext
29 lines
1.9 KiB
Plaintext
forecasts = [
|
|
{
|
|
'name': 'Today',
|
|
'temperature': 33,
|
|
'wind_speed': '15 mph',
|
|
'wind_direction': 'S',
|
|
'description': 'Cloudy then Snow Showers Likely'
|
|
},
|
|
{
|
|
'name': 'Tonight',
|
|
'temperature': 29,
|
|
'wind_speed': '10 to 18 mph',
|
|
'wind_direction': 'SW',
|
|
'description': 'Snow Showers'
|
|
},
|
|
{
|
|
'name': 'Wednesday',
|
|
'temperature': 38,
|
|
'wind_speed': '12 to 16 mph',
|
|
'wind_direction': 'SW',
|
|
'description': 'Rain And Snow'
|
|
},
|
|
]
|
|
|
|
today_forecast = [f for f in forecasts if f['name'] == 'Today']
|
|
print(today_forecast)
|
|
|
|
'wind_speed': '9 to 13 mph', 'wind_direction': 'W', 'description': 'Chance Snow Showers'}, {'name': 'Friday', 'temperature': 31, 'wind_speed': '10 mph', 'wind_direction': 'W', 'description': 'Chance Snow Showers'}, {'name': 'Friday Night', 'temperature': 20, 'wind_speed': '7 to 12 mph', 'wind_direction': 'SW', 'description': 'Snow Showers Likely'}, {'name': 'Saturday', 'temperature': 27, 'wind_speed': '12 to 15 mph', 'wind_direction': 'W', 'description': 'Snow Showers Likely'}, {'name': 'Saturday Night', 'temperature': 15, 'wind_speed': '9 to 13 mph', 'wind_direction': 'W', 'description': 'Chance Snow Showers'}, {'name': 'Sunday', 'temperature': 24, 'wind_speed': '9 to 13 mph', 'wind_direction': 'W', 'description': 'Chance Snow Showers'}, {'name': 'Sunday Night', 'temperature': 11, 'wind_speed': '7 to 10 mph', 'wind_direction': 'W', 'description': 'Chance Snow Showers'}, {'name': 'Monday', 'temperature': 25, 'wind_speed': '8 to 12 mph', 'wind_direction': 'SW', 'description': 'Chance Snow Showers'}, {'name': 'Monday Night', 'temperature': 15, 'wind_speed': '10 mph', 'wind_direction': 'SW', 'description': 'Chance Snow Showers'}]
|