0
what is the output of program in description and please explain
nums=[55,44,33,22,11] if all([i>5 for i in nums]): print("All larger than 5") if any([i%2==0 for i in nums]): print("Atleast one is even") for v in enumerate(nums): print(v)
3 Respostas
+ 5
Can you please describe where you don't understand?🤔
+ 3
enumerate(list) return ghe list elements with order
For example,
strings = ["a", "bc", "def", "ghij"]
for p in enumerate(strings):
print(p)
#(0, "a")
#(1, "bc")
#(2, "def")
#(3, "ghij")
for n, p in enumerate(strings):
print(n, p[-1])
#0 a
#1 c
#2 f
#3 j
0
for v in enumerate(nums):
print(v)