# -*- coding: utf-8 -*- """ Created on Thu May 17 16:00:59 2018 @author: stkarlos """ def list_list(r): k = [] #for i in range(0, len(r)): for i in r: s = 0 #for j in range(0, len(r[i])): for j in i: if type(j) != int and type(j) != float: continue else: #s += r[i][j] s += j k.append(s) return k print list_list( [3,5,8,9] , [1,2,-6] , [1,3,1,2,66,23]) print list_list([ [1,2] , ['a',-5]])