Run Program ❯
Python Home
❯
Run Code
Change Orientation
# Defining strings with single and double quotes string1 = 'Hello, world!' string2 = "Python is fun" # Including single quote in a double-quoted string quote1 = "It's a beautiful day" # Including double quote in a single-quoted string quote2 = 'He said, "Python is easy"' # Using escape characters quote3 = 'It\'s a beautiful day' quote4 = "He said, \"Python is easy\"" # Printing all strings print(string1) print(string2) print(quote1) print(quote2) print(quote3) print(quote4)