Answers for "how to subtract up everything in a list python"

0

how to subtract up everything in a list python

num = [1,2,3,4]

for x in range(len(num)):
  num[x]-=1 #Same as num[x] = num[x]-1
 
print(num)
#Good luck my future sofwtare devs
Posted by: Guest on May-30-2021

Code answers related to "how to subtract up everything in a list python"

Python Answers by Framework

Browse Popular Code Answers by Language