Created
June 14, 2016 07:26
-
-
Save ggarlic/e89ed3fdebb861cf3cd03c5a21b5af92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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