print(2*a) python code example

Example 1: python print

#Normal:#
print("Hiya Grepper!") #Output: Hiya Grepper!#
#As Equation:#
print(1+1)  #Output: 2#
#With String Variables:#
x = 'Pog'
print(x + 'Champ') #Output: PogChamp#
#With Integer Variables:#
y = 9999
z = str(y)
print('You have ' + z + ' IQ') #Output: You have 9999 IQ#
#NOTE: Not converting the int variable to a str variable will return an error#

Example 2: print in python 2

# Print is a keyword in python2, so it works more like this
print ""

# Also like this
print 1+1

Example 3: how do you add a print statement in python

print("What you would like to print") ## or
variable_name = "string"
print(variable_name)