Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion exercises/exercise_1/opdracht_1.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
def likes(team: list) -> str:
return True
if not team:
return "no one likes this"

if len(team) == 1:
return f"{team[0]} likes this"

# Als er meer dan één naam is, maak een mooie string:
names = ", ".join(team[:-1]) + f" and {team[-1]}"
return f"{names} like this"