Skip to content
Advertisement

Sorting lists within a list in Python

I have a list J consisting of lists. I am trying to sort elements of each list in ascending order. I present the current and expected outputs.

JavaScript

The current output is

JavaScript

The expected output is

JavaScript

Advertisement

Answer

Just remove the range

JavaScript

Output:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement