I was attempting to change a value within a dictionary list via a list variable. However it does not change. Is this a feature of a Dictionary list or am I doing something incorrect? Thank you in advance for any assistance.
Output:
Password Change FAILED, please try again
Code:
user_id = ['username', 'password', 'first_name', 'last_name', 'email', 'active'] account = {'username':user_id[0], 'password':user_id[1], 'first_name':user_id[2], 'last_name':user_id[3], 'email':user_id[4], 'active':user_id[5]} run = 1 while run == 1: user_id[1] = raw_input('Please enter a new password: ') if user_id[1] is account['password']: print "Password Successfully Changed!" run = 0 else: print "Password Change FAILED, please try again"
Password Change FAILED, please try again
Comment