Skip to content

Moved string literal concatenation from basics to manipulating strings #491

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deV8nek
Copy link

@deV8nek deV8nek commented Jun 28, 2025

The basic or standard string concatenation is using "+" operator which works for both string literals and variables. String literal concatenation is more appropriate on manipulating strings section after multiline strings since this feature can be used to reduce the number of backslashes needed, to split long strings conveniently across long lines, or even to add comments to parts of strings. Reference; https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation , https://docs.python.org/3/tutorial/introduction.html#text , https://stackoverflow.com/questions/34174539/python-string-literal-concatenation

The basic or standard string concatenation is using "+" operator which works for both string literals and variables.
String literal concatenation is more appropriate on manipulating strings section after multiline strings since this feature can be used to reduce the number of backslashes needed, to split long strings conveniently across long lines, or even to add comments to parts of strings. Reference; https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation , https://docs.python.org/3/tutorial/introduction.html#text , https://stackoverflow.com/questions/34174539/python-string-literal-concatenation
Copy link

netlify bot commented Jun 28, 2025

👷 Deploy request for pythoncheatsheet pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4b409a1

@deV8nek deV8nek closed this Jun 28, 2025
@deV8nek deV8nek reopened this Jun 28, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant