python can a function have a while true loop code example Example 1: while true python while True: doSomething() Example 2: how do you use a while true in python while True main():