返回顶部

收藏

Check a user name and PIN code

更多
database = [
    ['A',  '1234'],
    ['B',  '4242'],
    ['C',  '7524'],
    ['D',  '9843']
]

username = raw_input('User name: ')
pin = raw_input('PIN code: ')

if [username, pin] in database: print 'Access granted'

标签:Python,List

收藏

0人收藏

支持

0

反对

0

发表评论