1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] How would I stop a while loop after n amount of time?

Discussão em 'Python' iniciado por Stack, Setembro 15, 2025.

  1. Stack

    Stack Membro Participativo

    how would I stop a while loop after 5 minutes if it does not achieve what I want it to achieve.

    while true:
    test = 0
    if test == 5:
    break
    test = test - 1


    This code throws me in an endless loop.

    Continue reading...

Compartilhe esta Página