Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to subtract all the numbers in a list from the first number?

import functools
numbers = [175, 50, 25]
total = functools.reduce(lambda a, b: a - b, numbers)
print(total)
 
PREVIOUS NEXT
Tagged: #How #subtract #numbers #list
ADD COMMENT
Topic
Name
7+8 =