By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,676 Members | 2,262 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,676 IT Pros & Developers. It's quick & easy.


P: 1
I want to make a program that uses some variable. For example

i want to check for password, i want to use variable and if the password has changed then new password assign to the variable and old password wipe out...

how do i use this variable for my program....

can u plz give some suggestion....
Mar 17 '08 #1
Share this Question
Share on Google+
1 Reply

P: 314
Expand|Select|Wrap|Line Numbers
  1. test_var = 'passwd'
  2. user_inp = raw_input("Enter password: ")
  3. if test_var == user_inp:
  4.      print 'Correct'
  5. else:
  6.      print 'Incorrect'
  7.      user_inp = None
Is that something like what you were asking? I don't quite understand the question.
Mar 17 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.