I am practicing with for in loops and having trouble with this.
places = ["phuket", "athens", "doha"]
for places in range(5):
if places == 0:
print("thailand," + places 0 + "is a cool place")
else:
print("not thailand")
When I try this, I get a syntax error with 'places 0'. I want it to print thailand, phuket, is a cool place. But no matter how I seem to format places 0 (with the 0 in [], with it in ()) I just keep getting syntax errors.


places[0]and name yourforloop variable something other thanplacesso that you don't have conflicting names, eg:for i in range(5)is a more standard naming convention