Overclock.net banner

What is the exit program command for python?

726 Views 3 Replies 3 Participants Last post by  shook2000
I am making a small program that needs a password, so the way i am doing the password is:

password = raw_input("Enter your password: ")
if password == "secret":
print "Access Granted"
if password != "secret":
???

How do i make it exit the program?
1 - 4 of 4 Posts
Are your codeing this in VisualBasic? If so all you need to put is "end".

Code:
Code:
application.exit
  • Rep+
Reactions: 1
Well I don't know python, but I know in Perl and Ruby (two lanuages similar to python) you can type:
exit;
or
0;

to exit the current block.
2
Quote:


Originally Posted by t4ct1c47
View Post

Are your codeing this in VisualBasic? If so all you need to put is "end".

Code:
Code:
application.exit
]

See less See more
1 - 4 of 4 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top