mirror of
https://github.com/Lyxminxx/weatherCLI.git
synced 2026-10-11 12:52:01 +02:00
Fixed mistake where exit is shown twice when it is in the list of matching results
This commit is contained in:
1 parent
18ddc8d7c4
commit
0503e6eaeb
1 file changed
+3
-2
@@ -59,9 +59,10 @@ def selectCity():
|
||||
|
||||
# Update filtered cities based on search query
|
||||
filtered_cities = [city for city in all_cities if search_query.lower() in city.lower()]
|
||||
filtered_cities.append("Exit")
|
||||
|
||||
if "Exit" not in filtered_cities:
|
||||
filtered_cities.append("Exit")
|
||||
|
||||
|
||||
|
||||
# Call the function to display and select a city
|
||||
selected_city = selectCity()
|
||||
|
||||
Reference in new issue
Block a user