I'm new to programming, please try to answer in simple words. This is my code
username = ['dante', 'ares', 'zues', 'death', 'admin']
if username:
for user in username:
if user == 'admin':
print('Hello admin,would you like to see a status report?')
username.remove(user)
else:
print(f"Welcome {user},hope you have a good time!")
username.remove(user)
else:
print("we need to find users!")
Output:
Welcome dante,hope you have a good time!
Welcome zues,hope you have a good time!
Hello admin,would you like to see a status report?
Expected Output:
Welcome dante, hope you have a good time!
Welcome ares, hope you have a good time!
Welcome zues, hope you have a good time!
Welcome death, hope you have a good time!
Hello admin, would you like to see a status report?
We need to find users!