is there a way to omit automatic \n after 'print' in python 3.x?
i want my output something like this:-
2 2
2 4
4 8
8 32
my code is like this:-
a,b=1,2
while b<10:
print (str(b)+' '+str(b*a))
a,b=b,b*a
but i want my code to be like this to print the same thing:-
a,b=1,2
while b<10:
print (str(b))
a,b=b,b*a
print (str(b))
but its printing this:-
2
2
2
4
4
8
8
32
please help me out i am a newcomer in programming and python is my first language.
Thank you!