How To Exit Main Function In Python