最简单的Python数据库
2011-12-22 17:23 Donze Yeap 阅读(233) 评论(0) 编辑 收藏 举报database = [
['albert', '1234'],
['dilbert', '4242'],
['smith', '7524'],
['jones', '9843'],
]
username = raw_input('User name: ')
pin = raw_input('PIN code: ')
if [username, pin] in database: print 'Access Granted'
else: print 'No passing!'