While loop in Python is the best way to loop through your codes if you do not know how many times you want to run the same lines of codes. If you know how many times you want to run the same lines of codes, use For loop instead.
Online IDE: https://repl.it/languages/python3