Skip to content

Commit 38df4cb

Browse files
authored
Create 6.py
1 parent 4d91d45 commit 38df4cb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

6/6.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
array = [('바나나', 2), ('사과', 5), ('당근', 3)]
2+
3+
def setting(data):
4+
return data[1]
5+
6+
result = sorted(array, key=setting)
7+
print(result)

0 commit comments

Comments
 (0)