Skip to content

Commit e603ec2

Browse files
authored
Update attrgetter_sorting.py
1 parent 0b0225b commit e603ec2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

working-with-the-python-operator-module/attrgetter_sorting.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import operator
12
from dataclasses import dataclass
23

34

@@ -24,8 +25,6 @@ class Musician:
2425
for musician in musicians_list:
2526
group_members.append(Musician(*musician))
2627

27-
import operator
28-
2928
# Sorting on a single attribute.
3029

3130
get_id = operator.attrgetter("id")

0 commit comments

Comments
 (0)