Skip to content

Commit fb38efa

Browse files
authored
Update itemgetter_from_dictionary.py
1 parent e603ec2 commit fb38efa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import operator
2+
13
musicians = [
24
{"id": 1, "fname": "Brian", "lname": "Wilson", "group": "Beach Boys"},
35
{"id": 2, "fname": "Carl", "lname": "Wilson", "group": "Beach Boys"},
@@ -8,7 +10,6 @@
810
{"id": 7, "fname": "Brian", "lname": "Bennett", "group": "Shadows"},
911
]
1012

11-
import operator
1213

1314
# Get a single element
1415
get_element_four = operator.itemgetter(4)

0 commit comments

Comments
 (0)