Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to close a python program

#Follow me on grepper :D
#Using break in loop types
while True:
  user= input("are you want to close program (y/n)? ")
  if user == "y": 
      break
  elif user=="n":
  	print("ok")
  
  else:
  	print("invalid")
 
PREVIOUS NEXT
Tagged: #close #python #program
ADD COMMENT
Topic
Name
2+3 =