Welcome back to another coding exercise solution—I hope it went well!
This is my solution to the coding exercise. Again, it may be slightly different from yours!
nearby_people = {'Rolf', 'Jen', 'Anna'}
user_friends = set() # This is an empty set, like {}
friend = input('Enter your friend name to see if he is nearby: ')
# Add the friend to the user_friends set
user_friends.add(friend)
# Print out the friends that are nearby... those which are in both sets!
print(user_friends.intersection(nearby_people))
Let me know how you got on!
Kind regards,
— Jose and the Teclado team