Hi,

I am fairly new to the community, and have recently began to code using python, however, I am stuck on something:

I have written quite a length of code, and am using the 'if' command, and I am attempting to restart the code if they type 'yes'. It would look something like this:

if restart == "Yes":
(restart program here?!?)

I know to some, this is an incredibly easy thing to do, but I have tried multiple different solutions, none of them working. (I even tried examples from the internet - same outcome. They just restart the shell, or don't work at all.)

I have previously considered using a loop too, however, this doesn't seem to work either?? I am happy to take both restarting methods and loops, if they work.

If anybody has any information on how this is possible, please tell me!

I am using IDLE Python 3.6.4 32-bit (Incase you may need that)

Thank You!!

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.