G+_cody climer Posted April 27, 2014 Share Posted April 27, 2014 I'm a little behind, but this is my simple loop/list code. I'm loving the show and it's helping me wrap my head around loops, which has been tough for me. anyways feel free to rip me to shreds ;-] http://pastebin.com/WKuWXBj7 Link to comment Share on other sites More sharing options...
G+_Wesley Kerfoot Posted April 28, 2014 Share Posted April 28, 2014 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 More sharing options...
G+_cody climer Posted April 29, 2014 Author Share Posted April 29, 2014 Thanks for the input? Link to comment Share on other sites More sharing options...
Recommended Posts