I have this rather simple loop
cities = ['Merano', 'Madrid', 'New York', 'Bangkok']
countries = ['Italy', 'Spain', 'USA']
for index, city in enumerate(cities):
print('This is index:', index)
print('This is city:', city)
print('The length of the list \'cities\' is: ', len(cities))
print(print('The length of the list \'countries\' is: ', len(countries)))
print(countries[index])
print(5 * '#')
I expect it to break. However, what I did not expect is this output.
This is index: 0
This is city: Merano
The length of the list 'cities' is: 4
The length of the list 'countries' is: 3
None
Italy
#####
This is index: 1
This is city: Madrid
The length of the list 'cities' is: 4
The length of the list 'countries' is: 3
None
Spain
....
Where is the none coming from? I do not print this, nor do I execute something where I'd expect this to be printed...