+ 1
Why cant 34 and "34" in answer be d same?
6 Antworten
+ 2
The string 34 and the int 34 might look the same as output but they are different datatypes, they are used and operated on differently by Python programs.
+ 6
34 is an integer while "34" is a string.
+ 2
34 is an integer but "34" represents a string . if you wanna print 34 you can use print (34) but if you want to print "34" I think you'll have to use print("\"34"") I think
+ 2
x=34
print (x) this will give output as integer which is stored at x
whereas
print ("34")
this will give output as string
+ 1
Thats all right, i understand but if i put
x = 34
Print(x)
Print "34"
Both will be the same wont they??
0
if you take x=34 you can use it for doing any arthematic operations, but if you take x="34" you can't do.