Print one word from a string in python

Posted by Shai on Stack Overflow See other posts from Stack Overflow or by Shai
Published on 2010-05-15T18:02:03Z Indexed on 2010/05/15 18:14 UTC
Read the original article Hit count: 222

Hi,

How can i print only certain words from a string in python ? lets say i want to print only the 3rd word (which is a number) and the 10th one

while the text length may be different each time

mystring = "You have 15 new messages and the size is 32000"

thanks.

© Stack Overflow or respective owner

Related posts about split

Related posts about python