I would like to learn the difference between sys.stdout.write
and print
methods(or functions? Should I call them function or method?)
For example, the code below will print 11
a = str(1)
sys.stdout.write (a)
But this will print 1
a = str(1)
print (a)
Why is there such difference? Is there any way to make sys.stdout.write() print 1, not 11?
Thanks!