how to print string in python code example

Example 1: how to print something in python

print("whatever you want to print")

Example 2: how to print in python

print("hello world")

Example 3: how to print something in python

print("hello guys")

Example 4: print string python

str1 = "Hello World"
print(str1)

Example 5: strings in python

#A string is a type of data. There are many data types. It can be manipulated.
#It can be storerd as a variable
myString = "Hello world"
#WE can print it:
print(myString)
#You can append it to arraY:
myArr = []
myArr.append(myString)
#You can find the index of a character in a string:
H = myString[0]
#You can use methods on it:
lowercase = myString.lower()
#You can convert it into a integer provided it is a numerical string
myInt = int(myString)
#So thats the basics, hope i haven't left anything out.

Example 6: how to print string in python

print("Hello This is print string")

Tags:

Php Example