Skip to content

Instantly share code, notes, and snippets.

@ggarlic
Created June 14, 2016 07:26
Show Gist options
  • Save ggarlic/e89ed3fdebb861cf3cd03c5a21b5af92 to your computer and use it in GitHub Desktop.
Save ggarlic/e89ed3fdebb861cf3cd03c5a21b5af92 to your computer and use it in GitHub Desktop.
print "\nadding string variables\n"
a = "zhi"
b = "hu"
c = "yao"
d = "xxx"
print a+b+c+d
print "\nadding string literals\n"
print "zhi" + "hu" + "yao" + "xxx"
"""
Output:
adding string variables
calling string_concatenate
no place for resizing, will call string_concat
calling string_concatenate
calling string_concatenate
zhihuyaoxxx
adding string literals
zhihuyaoxxx
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment