How to clear these type of errors | Sololearn: Learn to code for FREE!

-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)

1/23/2022 2:19:46 AM

Amala Yakin

1 Answer

New 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 )