Skip to content

Instantly share code, notes, and snippets.

@mofodox
Created August 3, 2014 01:11
Show Gist options
  • Save mofodox/9fc8b9925706035ef0ca to your computer and use it in GitHub Desktop.
Save mofodox/9fc8b9925706035ef0ca to your computer and use it in GitHub Desktop.
w = "This is the left side of..."
e = "a string with a right side."
print w + e
# The question is: Explain why adding the two strings 'w' and 'e' with + makes a longer string.
# My answer to the question above: This is because Python knows both in 'w' and 'e' are strings and it automatically combines them rather than evaluate it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment