Im trying to reproduce this c for loop (below) in python. but the result displays each iteration on a new line is there a way to print and not start a new line?
Code in C++:
int pennies = 10;
for (int i = 1; i <= 6; i = i + 1)//cout "o" for every penny
{
cout << "o";
}
output:
oooooooooo
And in python I have tried:
pennies = 10
for i in range(pennies):
print("o")
output:
o
o
o
o
o
o
o
o
o
o