The error is self-explanatory. You are trying to subscript an object which is a None actually...
Example 1
list1=[5,1,2,6] # Create a simple list
order=list1.sort() # sort the elements in created list and store into another variable.
order[0] # Trying to access the first element after sorting
TypeError Traceback (most recent call last)
in ()
list1=[5,1,2,6]
order=list1.sort()
----> order[0]
Example 1
list1=[5,1,2,6] # Create a simple list
order=list1.sort() # sort the elements in created list and store into another variable.
order[0] # Trying to access the first element after sorting
TypeError Traceback (most recent call last)
in ()
list1=[5,1,2,6]
order=list1.sort()
----> order[0]