content.map(lambda x:x.split('.')[0]).values code example Example: python3 lambda >>> sum = lambda x, y : x + y >>> sum(3,4) 7