print string python code example
Example 1: python print
# This is a print statement
print("Hello, world!")
Example 2: print string python
str1 = "Hello World"
print(str1)
Example 3: how to print a string in python
print("Insert your message here.")
Example 4: print string python
Name = "Jack"
print(" Good morning! Mr.",Name)
Example 5: how to use + with strings
# + is an overloaded operater, meaning it has more than one meaning
firstStr = "This is an "
secondStr = "example."
# + can join two strings end to end
example = firstStr + secondStr
print(example)
# Output -> This is an example.
#other things you can do
other1 = firstStr + "apple"
other2 = "Stri" + "ng"