Skip to content

How to write a while statement in Python?

myvariable = 10
while myvariable > 0:
  print(myvariable)
  myvariable -= 1
See also  Flatten a list of lists in Python

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.