On 26/10/13 20:32, Siva Cn wrote:
p1 = tuple([float(ele) for ele in input('Please type ...').split()])
If you do it all in one line like that you dpn;t need the [] inside the tuple() call. The generator expressoion will work directly.
But of course a single line like that will be hard to debug if you get anything wrong.
You have to decide which trade off you prefer, size v complexity. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor