Skip to content

Instantly share code, notes, and snippets.

@OpnSrcConstruction
Created April 9, 2019 21:13
Show Gist options
  • Save OpnSrcConstruction/27f28769e05311251261115cfee66500 to your computer and use it in GitHub Desktop.
Save OpnSrcConstruction/27f28769e05311251261115cfee66500 to your computer and use it in GitHub Desktop.
Python example: string con-catting #python #cat #string
'''
@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