You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README section titled "2. Creating a Dictionary", the provided example incorrectly uses a type annotation that does not match the data structure.
This line suggests that american_cities is a dictionary, but in reality, it is a list of strings.
Using dict as the type annotation for a list is misleading and incorrect, especially for beginners learning Python. It contradicts the concept being demonstrated and may cause confusion.
Suggested Fix:
Update the line to use the correct type annotation:
american_cities: list = ["New York", "Los Angeles", "Chicago", "Houston", "Phoenix"]
This correction will accurately reflect that american_cities is a list of strings, not a dictionary.