[Tutor] Comparing a string

jfouhy@paradise.net.nz jfouhy at paradise.net.nz
Fri May 20 12:50:49 CEST 2005


Quoting Jonas Melian <jonasmg at softhome.net>:

> I'm tryin compare a string with a value with style of pattern-matching.
> 
> string = 'i686'
> 
> if string == glob.glob(i?86):

This is a task for regular expressions!

Have a look at the re module.

(and feel free to ask for more help if you're having trouble with it)

-- 
John.


More information about the Tutor mailing list