I wrote this program to join all the elements of sub-lists in a single result empty list and then sort the returned result list. But after i run this program i get a unusual output. I get None on console screen.
What's wrong here in this code?
n=[[44,45,76,8,678,24,24],[45,45737,45,7373]]
def makelist(lis):
result= []
for i in lis:
for j in i:
result.append(j)
return result
print makelist(n).sort()
n = makelist(n) n.sort() print nit should work