Oct-10-2016, 08:06 PM
Going back to your original post, in addition to what ichabod801 pointed out, lines 10 and 11 are not indented properly. Also, in line five you are iterating through the list 'admin' and can be simplified to
def login(name): if name in admin: print("Welcome in the system " + name) logged_in = 1 else: print('you are not an admin')
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition