- 1

How to clear these type of errors

salaries = [2000, 1800, 3100, 4400, 1500] t = 1000 salaries=list(map(lambda x,y:x-y,salaries,t )) print(salaries)

23rd Jan 2022, 2:19 AM
Amala Yakin
1 Answer
+ 1
Make an iterable and fill it with subtracting value. salaries = [ 2000, 1800, 3100, 4400, 1500 ] t = tuple( 1000 for i in range( len( salaries ) ) ) salaries = list( map( lambda x, y: x - y, salaries, t ) ) print( salaries )
23rd Jan 2022, 2:58 AM
Ipang