[Tutor] How to run same lines of code in different order at runtime

Alan Gauld alan.gauld at btinternet.com
Fri Jul 10 11:10:34 CEST 2015


On 10/07/15 01:29, Alan Gauld wrote:

> It would be easierv to access the last element directly rather than
> looping:
>
> lastCity = route[-1]

Oops. looping -> calculating.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list