Is it possible to add a time limit for user input in Python?
something like this:
while true:
ans = input("please enter a text")
timelimit = 5 seconds
if timelimit = reach
restart the code
the given code in the other solution is that if the time runs out it still asking for input and not restarting is there any way I can restart the script or loop it out after time runs out?