How to stop data entry at next login in python?

Suppose I am requesting 2 inputs:

input("Age:")
Something*
input("Name:")

      

But if I do this, then if I put 2 inputs. So if he is asked for age and I put "5". Then, when the program does something, any inputs I make will go into the slot asking for a name until "Name:" appears. How can I stop this?

+3


source to share


1 answer


You can do something like this with module slips

(from this post fooobar.com/questions/2415066 / ... possibly duplicate)



input("Age:")

import curses
stdscr = curses.initscr()
curses.noecho()
# Something*
import time
time.sleep(5)
curses.endwin()

input("Name:")

      

0


source







All Articles