Jump to content

I 'm a little behind, but this is my simple loop list code


G+_cody climer
 Share

Recommended Posts

Good job, just a few style suggestions.

 

On line 10, you can write "not cityName" and it will test for an empty string as well, it makes it clearer that you're testing for a "falsey" value.

 

On line 25, the parentheses around 'cityList' are redundant, they just get ignored by python.

 

Also on line 26, the call to str() is redundant since the city names are already strings, you can just print them and it will work (actually you can print most things and it will just work).

Link to comment
Share on other sites

 Share

×
×
  • Create New...