close running python file command code example Example: how to stop running code in python #to stop all execution of code exit()