Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

33 lines (27 sloc) 577 Bytes

To represent user credentials, try one of:

  • A dictionary where the keys are usernames and the values are passwords
{
  'robert': 'password123',
  'anoosh': 'snuffles456',
  'juan': 'happyland'
}
  • A list where each element is a dictionary with 2 keys: username and password
[
  {
    'username': 'robert',
    'password': 'password123`
  },
  {
    'username': 'anoosh',
    'password': 'snuffles456`
  },
 {
    'username': 'juan',
    'password': 'happyland`
  }
]

In each case, think about how, given a username, you can verify an associated password.

You can’t perform that action at this time.