I am a novice python learner, though I know printing text containing strings and variables but I want to ask a basic question regarding this. Here is my code:
x=5
print ("the value of x is ",x)
print "the value of x is",x
The first print command prints ('the value of x is ', 5) while the second one prints, the value of x is 5. But print ('hello') & print 'hello' prints hello (the same), why?
(x + y) + 1made a tuple out ofx + y, that would ruin everything! That's why one-tuples are made like('hello', )with that trailing comma