[Tutor] trying to find the python equivalent for VB6 "left", "right" and "mid"

Fabian von Berlepsch pub at berlepsch.de
Mon Nov 22 02:28:38 CET 2004


Hallo Guys,

I am almost having a nerve crisis! 
Since 3 hours I am trying to find the python equivalent for VB6 "left",
"right" and "mid". 

Example (what I am looking for): 

>>> mystring = "Hello world"

>>> print left(mystring,7)

Hello w

- or -

>>> mystring = "Hello world"

>>> print mid(mystring,2,8)

ello wor

--------------------------

You see? 
Thank you so much for getting me out of that mess!

Fabian



More information about the Tutor mailing list