Advertisement
here2share

# py3_basic_spin.py

Mar 8th, 2021
777
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. # py3_basic_spin.py
  2.  
  3. import time
  4.  
  5. def spin():
  6.     for _ in range(100):
  7.         for ch in '-\\|/':
  8.             print(ch, end='', flush=True)
  9.             time.sleep(0.1)
  10.             print('\b', end='', flush=True)
  11.  
  12.  
  13. if __name__ == '__main__':
  14.     spin()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement