{} in string in python code example
Example 1: print string python
str1 = "Hello World"
print(str1)
Example 2: python string in string
>>> str = "Messi is the best soccer player"
>>> "soccer" in str
True
>>> "football" in str
False
Example 3: string in python
# ways to dfefine string in python
string = "String"
string = str(string)
# Can Add strings
s1 = "Str"
s2 = "ing"
s = s1 + s2 # "String"
Example 4: how to print a string in python
print("Insert your message here.")