Oct-08-2019, 03:29 AM
The problem is on the last few lines. This will not work:
To do this, you need this instead:
if passwordToLookup == 'yahoo': passwordEncrypt(print(passwords[0][1], encryptionKey)) elif passwordToLookup == 'google': passwordEncrypt(print(passwords[1][1], encryptionKey))When functions are chained like that, they are called and returned from the inside out. So, print() will print the password and key to your console first. Then, print() returns None to passwordEncrypt() because it does not have a return statement. passwordEncrypt() assigns None as the first argument and has no value for the second argument.
To do this, you need this instead:
if passwordToLookup == 'yahoo': passwordEncrypt(passwords[0][1], encryptionKey) elif passwordToLookup == 'google': passwordEncrypt(passwords[1][1], encryptionKey)