“Comment imprimer Python” Réponses codées

imprimer en 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="") 
Nishant Tiwari

Fonction d'impression Python

print('datacamp','tutorial','on','python','print','function',sep='\n') #`\n` will put each word in a new line
Alive Anaconda

Comment imprimer quelque chose en python

print("dog")
dogeception

Comment imprimer Python

print ("hola")
Funny Fish

Fonction d'impression dans 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)
Rajitha Amarasinghe

Comment imprimer en Python

s = "Let's Run This Code"
print(s)
Glorious Giraffe

Réponses similaires à “Comment imprimer Python”

Questions similaires à “Comment imprimer Python”

Plus de réponses similaires à “Comment imprimer Python” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code