create functions in loop python code example Example: how to make a loop in python x = 0 while True: #execute forever x = x + 1 print(x)