#ESCAPE CHARACTERS
txt = "We are the \"Buddies\" from the south."print("OUTPUT 1 : ",txt)txt = 'It\'s alright.'print("OUTPUT 2 : ",txt) txt = "This will insert one \\ (backslash)."print("OUTPUT 3 : ",txt) txt = "Hello\nBuddy!"print("OUTPUT 4 : ",txt) txt = "Hello\rBuddy!"print("OUTPUT 5 : ",txt) txt = "Hello\tBuddy!"print("OUTPUT 6 : ",txt) #THIS EXAMPLE ERASES ONE CHARACTER (BACKSPACE):txt = "Hello \bBuddy!"print("OUTPUT 7 : ",txt)
No comments:
Post a Comment