Pattern Matching Given # of Characters and no String Input; use RegularExpressions?

Synonymous sm.synonymous at gmail.com
Thu Apr 21 01:30:23 EDT 2005


John Machin <sjmachin at lexicon.net> wrote in message news:<aq3661d0q7f204t61f4mghf01fm8v5g9pv at 4ax.com>...
> On 17 Apr 2005 18:12:19 -0700, sm.synonymous at gmail.com (Synonymous)
> wrote:
> 
> >
> >I will look for a Left$(str) function that looks at the first X
> >characters for python :)).
> >
> 
> Wild goose chase alert! AFAIK there isn't one. Python uses slice
> notation instead of left/mid/right/substr/whatever functions. I do
> suggest that instead of looking for such a beastie, you read this
> section of the Python Tutorial: 3.1.2 Strings. 
> 
> Then, if you think that that was a good use of your time, you might
> like to read the *whole* tutorial :))

Haha it always comes down to RTFM i guess, which is always the best
advice :o).

Thank you for your help, Now that I think about it I guess string is
exactly what I am looking for because even though I am using file
names I am treating them like strings when comparing them.

Byebye :o)

S M



More information about the Python-list mailing list