python print function
print('Hello,World!')
print function python
print('datacamp','tutorial','on','python','print','function',sep='n') #`n` will put each word in a new line
print function in python
2 + 1
#Addition is done by Python, but doesn't show us the answer
print(2 - 1)
#output - 1 (This will solve and show us the answer, 2,1 and 3 all are integers)
x = 2 * 1
print(x)
#output - 2 (We have printed the varible and got the answer, all are integers)
x = 2
y = 1
print(x / y)
#output - 2.0 (When division is done answer is given as a float)
x = "2"
y = "1"
print(x + y)
#output - 21 (When two strings are added, it concatenate and the answer
# is also a string)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us