Typo error: Python 2.7*
How do i concatenate output from loop without using a function?
for example if i write this program:
x=1
while x<=3:
the output is:
1
1
1
if I write it like this:
x=1
while x<=3:
the output is:
1 1 1
I want the output to be 111, no spaces/gaps in between.
This is just the simplified version, I want it to be like if there are many consecutive loops, all there output be attached to each other with no space/gaps/new lines.
How do i concatenate output from loop without using a function?
for example if i write this program:
x=1
while x<=3:
print "1"
the output is:
1
1
1
if I write it like this:
x=1
while x<=3:
print "1",
the output is:
1 1 1
I want the output to be 111, no spaces/gaps in between.
This is just the simplified version, I want it to be like if there are many consecutive loops, all there output be attached to each other with no space/gaps/new lines.
Last edited: