I have 3 lists:
members = ['Alex', 'Danny', 'Kieran', 'Zoe', 'Caroline']
visitors = ['Scott', 'Helen', 'Raj', 'Danny']
signups = ['Helen', 'Scott']
The function should return a list of visitors who are neither existing nor new members. If there are none, return None.
This is my code:
def guests(member,signup,visitor):
visit = []
for person in visitor:
if person not in member and signup:
visit.append(person)
return visit
return print("None.")
but my output returns ["Scott"]. I can't seem to figure what i haven't done right.