Ask coding questions

← Back to all posts
Why do input statements overlap on the console and how to fix it? (python)
CodyWilcox (0)

I'm working on a school project and cant tell how my work is going because when I run the code all of the input statements look like this

thanks in advance for help.


the simplest solution is to try using \n in your input. But it randomly in your input. It should work

malvoliothegood (845)

You can use triple quoted strings in Python to preserve formatting, like so:

choice = input("""Which one of these do you like to eat the best:
1. cake,
2. biscuits,
3. pizza? 
> """)
CodeLongAndPros (1596)

Please link to the repl

CodyWilcox (0)

@CodeLongAndPros if you are talking about the console it only goes back to normal if you make it really small, but then it cuts off a lot of the text and gets covered by the search and clear bar.