print 1 word of string in python

From thelinuxwiki
Jump to: navigation, search

mystring = 'cheetahs run real fast'

print mystring.split()[2]

real

the [index] starts at zero