View Single Post
Old Aug 23rd, 2005, 8:32 AM   #4
Moldz
Programmer
 
Moldz's Avatar
 
Join Date: Feb 2005
Posts: 54
Rep Power: 4 Moldz is on a distinguished road
I think the mid function returns a part of a string. In python, you can consider a string as a list of characters and use the [] notation to get slices. See this tutorial on Python string handling or some simple code:
>>> s = "Hello World!"
>>> s[0]
'H'
>>> s[0:5]
'Hello'
>>> s[:5]
'Hello'
>>> s[6:13]
'World!'
>>> s[6:]
'World!'
>>> s[-1]
'!'
Moldz is offline   Reply With Quote