def get_user(database, user_id):
# Simulate database lookup
user = database.get(user_id, None)
return user
# Simulated database
users = {
1: 'Alice',
2: 'Bob',
# Notice there's no user with ID 3
}
# Fetching a user
user = get_user(users, 3)
if user is None:
print("No user found with that ID.")
else:
print(f"User found: {user}")
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)