What\'s the quickest/cleanest way to remove the first word of a string? I know I can use split and then iterate on the array to get my string. But I\'m pretty s
split
Presuming you can guarantee the words are separated by a single space, str.partition() is what you are looking for.
>>> test = "word1 word2 word3" >>> test.partition(" ") ('word1', ' ', 'word2 word3')
The third item in the tuple is the part you want.