database = [ ['a', '1234'], ['b', '4242'], ['c', '7524'], ['d', '9843'] ] username = 'albert' pin = '1234' if [username, pin] in database: print 'Access granted'