+ 6
Answered in your other post ;-) s = "This is a sample sentence" words = s.split() print(words[0], words[-1]) # words[0] = first word in words list words[-1] = last word in words list # outputs # This sentence
29th Jan 2018, 2:16 AM
ChaoticDawg
ChaoticDawg - avatar