print("Giraffe\nAcademy") # new line print("Giraffe\"Academy") # escape sequence print("Giraffe\\Academy")
phrase = "Giraffe Academy" print("\n\n" + phrase) # appending another strings is concatenation (+)
# function print(phrase.lower()) print(phrase.upper()) print(phrase.isupper())
# function in combination print(phrase.upper().isupper())
# length function print(len(phrase))
# index of the character print(phrase[0])
# passing a parameter print(phrase.index("a")) print(phrase.index("Acad"))
# In here I can actually give this two parameters so I can give this replace function two values that it can use. print(phrase.replace("Giraffe", "Elephant"))
Recommended Posts