Whitespace
noun
say it: “WYTE-spays” /ˈwaɪtspeɪs/
The characters you can't see in text: spaces, tabs and line breaks.
What is whitespace?
Whitespace means spaces, tabs and new lines. In Python it matters: the spaces at the start of a line decide which block that line belongs to.
if True:
print("inside the if") # indented: part of the if
print("outside the if") # not indented
In a sentence
- “A space of whitespace after "Maria" made the two names look the same but count as different.”
- “strip() takes the whitespace off both ends of each value.”
Level: Novice · More Python terms at this level
Updated