[Tutor] string delimiters

Alan Gauld alan.gauld at btinternet.com
Wed Jun 3 22:31:30 CEST 2015


On 03/06/15 21:23, richard kappler wrote:
> hold the phone!!!!
>
> I have no idea why it worked, would love an explanation, but I changed 
> my previous test script by eliminating
>
> for tag in ("icdm"):

This loops over the string assigning the characters i,c,d and m to tag

> if 'icdm' in line:

This checks if the 4 character string 'icdm' is in the line.
Completely different.

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