- The Python Apprentice
- Robert Smallshire Austin Bingham
- 40字
- 2025-04-04 19:04:57
Concatenation of adjacent strings
Adjacent literal strings are concatenated by the Python compiler into a single string:
>>> "first" "second"
'firstsecond'
Although at first this seems rather pointless, it can be useful for nicely formatting code as we'll see later.