-2
The following code should return all cars from the following list:
cars = ['audi','bmw','subaru','toyota']
for car in cars:
if car == 'bmw':
print(car.upper())
else:
print(car.title())
But he only returned: BMW Toyota
What’s wrong with it?
I couldn’t reproduce the problem: https://ideone.com/8RqW2K
– Maniero
That’s weird. I’m using IDLE. I’m going to test on Atom. Thank you.
– Giuseppe Lira