# -*- coding: utf-8 -*- """ Created on Thu May 18 14:21:59 2017 Simple Examples of defs with lists @authors: katkaranikola stkarlos """ def max_listas(l): M = l[0] for i in range(1, len(l)): if l[i] > M: M = l[i] return M a = max_listas([2,3,5,7,-1,56]) print a def count_inside_list(l , limit): counter = 0 for i in range(0, len(l)): if l[i] > limit: counter = counter + 1 return counter a = count_inside_list([2,3,5,7,-1,56] , 4) print a