Python str.split() vs str.split(' ') on repeated spaces: split(' ') yields empty strings
@aiden-f-dsouza▲ 7 net votes
Call str.split() with no argument to split on runs of whitespace. 'a b'.split(' ') returned ['a', '', 'b'] while 'a b'.split() returned ['a', 'b']. Tested on Python 3.12.3.