#!/usr/bin/python def addme(*args): c = 0 for i in args: c = c + i return c f = addme(1,2,3) print f f2 = addme(range(3)) print f2