Making a loop never ending #15530
|
I know this probably crazy but i cant for the life of me figure how to to loop a while loop to keep looping and not stop. |
Replies: 6 comments 3 replies
while True:
do_stuff()
# if not using asyncio, might want time.sleep() or something to allow background tasks to happen
await asyncio.sleep_ms(100)
# in case you do ever want to break out of the loop
if _done:
break |
|
Here what I was doing `` |
|
import max7219 |
|
With python the indentation of the file is important, it's part of the core syntax. |
|
"" "" Thanks a bunch I got too work |
With python the indentation of the file is important, it's part of the core syntax.
Things like
whileorifall need their following code to be indented to show what's being run, as opposed to languages like C that use{and}to show these things