Print one word from a string in python -


How can I print only a few words from a string in Python? It is said that I want to print only the third word (which is a number) and the 10th

, while the duration of the text can be varied every time

mystring = "Thank you."

pre> mystring = "your There are 15 new messages and the size is 32000 "parts = mystring.split ('') message_count = int (parts [2]) message_size = int (parts [9])

< / Html>

Comments