don't break when using sets
This commit is contained in:
parent
cdc9b0ecd1
commit
3710a476e8
@ -11,6 +11,6 @@ def take_most_important(landmarks: list[Landmark], n_important) -> list[Landmark
|
||||
"""
|
||||
|
||||
# Sort landmarks by attractiveness (descending)
|
||||
landmarks.sort(key=lambda x: x.attractiveness, reverse=True)
|
||||
sorted_landmarks = sorted(landmarks, key=lambda x: x.attractiveness, reverse=True)
|
||||
|
||||
return landmarks[:n_important]
|
||||
return sorted_landmarks[:n_important]
|
||||
|
Loading…
x
Reference in New Issue
Block a user