Created
April 9, 2019 21:13
-
-
Save OpnSrcConstruction/27f28769e05311251261115cfee66500 to your computer and use it in GitHub Desktop.
Python example: string con-catting #python #cat #string
This file contains 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
''' | |
@author: kjlw99 | |
''' | |
# String Concatonation Example. | |
var_1 = 'Hello Harry' | |
var_2 = var1 + ' Potter!!' | |
print var_1 | |
#String Replace 'Harry Potter' with 'Muggle' | |
print var2[:6] + 'Muggle' | |
OUTPUT: | |
Hello Harry Potter!! Hello Muggle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment