pile1_str = "pile 1: "
x="O"
y=1
while y <= pile1:
pile1_str = pile1_str + x
if y%1==0:
pile1_str = pile1_str + " "
print(pile1_str)
y= y+1
solved How to add a space between a string for every 5th letter? [duplicate]
pile1_str = "pile 1: "
x="O"
y=1
while y <= pile1:
pile1_str = pile1_str + x
if y%1==0:
pile1_str = pile1_str + " "
print(pile1_str)
y= y+1
solved How to add a space between a string for every 5th letter? [duplicate]