Python: how to automaticlly restart my programme


hi everybody!

I am the beginner. I made a small programme with Python. It runs very well. But I want to do more for this one.
My question is after While bingo==True, how it can restart automaticlly.


You can put everything inside another while loop, ask user for input, e.g Press 'n' for new game or 'q' to exit then compare and break if necessary.

Maybe like this (don’t know python):

while True:

    while bingo == False:

    query = input('Press 'n' for new game or 'q' to exit: ')

    if query == 'q':

Thanks for your answer . I will try it later. I think your thought is right. But Python may have different rules.
I may create it when I learn more about Python.

1 Like