split by last space python code example
Example 1: python split first space
>>> s = "238 NEO Sports"
>>> s.split(" ", 1)
['238', 'NEO Sports']
Example 2: python split only last occurrence of a character
s.rsplit(',', 1)
s.rpartition(',')
>>> s = "238 NEO Sports"
>>> s.split(" ", 1)
['238', 'NEO Sports']
s.rsplit(',', 1)
s.rpartition(',')