This is my code
[temp.append(i.get_hot_post(3)) for i in node_list]
[hot_posts+i.sort(key=sort_by_rate) for i in temp ]
get_hot_posts() return a list of 3 items this way
return recent_posts[0:amount-1]
it could be that the list is shorter than 3 elements and it probably mess the things around but go on
[temp.append(i.get_hot_post(3)) for i in node_list]
after this command, in "temp" i have a list of lists and it's fine.
But when it executes
[hot_posts+i.sort(key=sort_by_rate) for i in temp ]
it gives this error
TypeError: can only concatenate list (not "NoneType") to list