Yes, as @mtf said above, this is incorrect. You cannot use sorted()
in this way.
the documentation is useful here.
https://docs.python.org/3/howto/sorting.html
we should help each other to learn not to suggest new thing instead of the person is asking. Because , everything is included step by step in the learning syllabus. So if a person doesn’t know how to use 2d list properly, how he or she will get to zip function which works like tuples.
1 Like