On 03/04/18 01:19, Steven D'Aprano wrote:
>
>>     if Grade not in 'A','B','C','D','E','F':
> Actually, that returns a tuple consisting of a flag plus five more 
> strings:
>
> py> 'A' in 'A','B','C', 'D', 'E', 'F'
> (True, 'B','C', 'D', 'E', 'F')

Although in the context of the program the colon at the end ensures
we get a syntax error so the mistake is found pretty quickly...

-- 
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

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to