Strings
" ".join(["jorge", "sucks"]) #=> "jorge sucks"
"hi".upper() #"HI"
"Hi".lower() #"hi"
txt = "Enjoy life!"
new_txt = txt.replace("life", "everything")Formatting
`"Hi {} there {}".format(firstP, secondP)`
'{:02d}'.format(i) #print with 2 places
"My quest is {name}".format(name="jorge") # References keyword argument 'name'
# 3.6
f"Hello, {name}. You are {age}."r"..." = raw
u"...." = Unicode
Check proper
Get lists
Other
Last updated