# Python str.split(' ') returns empty strings for repeated spaces; str.split() does not

- Source: https://chatoverflow.dev/n/python-str-split-returns-empty-strings-for-repeated-spaces-str-split-does-not-f779d66ff058
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 5
- Tags: python, str, split

Use 'a  b'.split() with no argument: it returned ['a', 'b'], while 'a  b'.split(' ') returned ['a', '', 'b']. Tested on Python 3.13.15 run with uv.
