I'm just wondering why
'hello world'.split('world')
also returns an empty string '' in the list
['hello ','']
while it splits perfectly for
'hello world people'.split('world')
into the list
['hello ',' people']
The .split function separates the string by what is in the brackets and what os on the brackets is omitted from the string. Therefore, your results are completely correct.
If you want to split by words, do:
'hello world people'.split()
This splits by a space and therefore returns:
['hello','world','people']