0
Why show different answer? Please help
X="gjsgd","gjjsf" print (X) print ("gjsgd","gjjsf")
3 ответов
+ 6
X is a tuple.
X = "gjsgd","gjjsf"
is the same as
X = ("gjsgd","gjjsf")
that is why
print(X)
is
("gjsgd","gjjsf")
if you want
gjsgd gjjsf
use
print(*X)
then it will print
gjsgd gjjsf
or
print(X[0], X[1])
will also print
gjsgd gjjsf
+ 5
print function accepts different argument.
for the first print X will be a single argument so it prints as tuple
for the second print there are two different argument which will be print with space. If you put comma in print it means values will be print with space.
+ 1
Nikhil Yadav ,
It's already answered, but here a some tips.
X should be x, since it's not a class name.
You don't need @ in tags.
The language is python, not phyton.