You can use lambda here:
counters = [1, 2, 3, 4] d=list(map((lambda x: x + 3), counters)) # Function expression print( d )
Here, the function adds 3 to each item in the counters list.