in print python code example

Example 1: how to print something in python

print("whatever you want to print")

Example 2: python print

# This is a print statement
print("Hello, world!")

Example 3: print() in python

print('hi, baby!')

Example 4: print in python

# Simple Print:
print("Hello World!")

# Formatting message in python3.6- :
name = "World"
print("Hello {}!".format(name))

# Formatting message in python3.7+ :
name = "World"
print(f"Hello {name}!")

Example 5: how to print python text

print ("Example")

Example 6: print in python

# hello world
print("hello world")

#usage of sep()
print(10,1,2001,sep="/")

#usage of end()
l = ["d","x","4","i","o","t"]
for i in l:
    print(i,end="")

Tags: