Hey, I'm trying to figure out how to input a space between every fifth letter in my program after the computer asks how many coins they would like. So this is what it looks like currently.
pile1_str = "pile 1: "
x="O"
y=1
while y <= pile1: #pile1 being the number of chips the user inputs
pile1_str = pile1_str + x
print(pile1_str)
y= y+1
Here's what it's supposed to look like when you input, say 12 coins:
pile 1: OOOOO OOOOO OO
What can I do to insert a space in the string after every n-th (5th) character?