Program to multiply all the items in a list.

Code:

tot = 1

items = [1, 2, 3, 3]

for x in items:

    tot *= x

print("Multiplication of all items: ", tot)

 

Output:

Comments

Popular posts from this blog

State use of pep and pip