You can use quotes inside a string, as long as they don't match the quotes surrounding the string:
print("It's alright")
print("He is called 'Johnny'")
print('He is called "Johnny"')
You can assign a multiline string to a variable by using three quotes:
You can use three double quotes:
a = """Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua."""
print(a)
To get the length of a string, use the len() function.
The len() function returns the length of a string:
a = "Hello, World!"
print(len(a))
To check if a certain phrase or character is present in a string, we can use the keyword in.