Daily #7 · 5 October 2026
Splitting on a space Easy
What does this print?
print("to be".split(" "))
Show the answer
D: ['to', '', 'be']
Why: There are two spaces, so splitting on exactly one space leaves an empty string between them. split() with no argument splits on any run of whitespace and drops the empties.