O'Reilly logo
  • Longxiang Lyu thinks this is interesting:

5-9. No Users:

From

Cover of Python Crash Course

Note

usernames = []

usernames = ['admin', 'donald trump', 'barak', 'Kanye West']

admin = "Hello admin, would you like to see a status report?"
normal = "Hello "
if not usernames:
print("Empty usernames")
greetings = map(lambda x : admin if x == 'admin' else normal + x, usernames)
for greeting in greetings:
print(greeting)