1 parent 07dab2d commit 4a60568Copy full SHA for 4a60568
2 files changed
lesson23/server.py
@@ -17,6 +17,7 @@ def get_weather():
17
18
# Check for empty strings or string with only spaces
19
if not bool(city.strip()):
20
+ # You could render "City Not Found" instead like we do below
21
city = "Kansas City"
22
23
weather_data = get_current_weather(city)
lesson23/weather.py
@@ -21,8 +21,9 @@ def get_current_weather(city="Kansas City"):
city = input("\nPlease enter a city name: ")
24
- if not bool(city.strip()):
25
- city = "Kansas City"
+ # This step is not required here
+ # if not bool(city.strip()):
26
+ # city = "Kansas City"
27
28
29
0 commit comments