""" List Comprehensions instead of map and filter """ theoldlist = range( 10 )thenewlist = map( lambda x: x + 23 , theoldlist)thenewlist2 = [x + 23 for x in theoldlist] print thenewlist == thenewlist2thenewlist = filter( lambda x: x > 5 , theoldlist)thenewlist2 = [x for x in theoldlist if x > 5 ] print thenewlist == thenewlist2thenewlist = map( lambda x: x + 23 , filter( lambda x: x > 5 , theoldlist))thenewlist2 = [x + 23 for x in theoldlist if x > 5 ] print thenewlist == thenewlist2 # ###################################### the output is : >>> TrueTrueTrue >>>