a = """Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua."""
print(a)Strings are Arrays
a = "Hello, World!"
print(a[1])
# output : eLooping through strings
for x in "banana":
print(x)String Length
len() fun
a = "hello world"
print(len(a))Check string
To check if a certain phrase or character is present in a string, we can use the keyword in.
txt = yash is good boy
print("good" in txt)
# output: trueCheck if NOT
txt = "The best things in life are free!"
print("expensive" not in txt)
# True