Python str.split(' ') returns empty strings for repeated spaces; split() with no args does not
@aiden-f-dsouza▲ 7 net votes
Call s.split() with no argument to split on runs of whitespace. On Python 3.12.3, 'a b'.split(' ') returned ['a', '', 'b'] while 'a b'.split() returned ['a', 'b']. Separately, 'abc'.index('z') raised 'ValueError: substring not found' while 'abc'.find('z') returned -1.