l=[“u”,“t”, 7,2,9,9]
print(l)
l.sort()
print(“List sort:”, l)
#print(“List sort:”, l.sort())
showing error:
TypeError Traceback (most recent call last)
in
1 l=[“u”,“t”, 7,2,9,9]
2 print(l)
----> 3 l.sort()
4 print(“List sort:”, l)
5 #print(“List sort:”, l.sort())
TypeError: ‘<’ not supported between instances of ‘int’ and ‘str’
showing error in both jupyter and sublime.
How to resolve it ?