Hey, I'm trying to make a program restart if a function (in this case playAgain) is true. Is there a simple way to do this?

Here's the end of my program:

theGame()
if playAgain() == True:
else:
    quit()

You can use this structure

while True:
    theGame()
    if not playAgain():
        break
quit()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.