Live quiz

python-programing - Part 30

Question 1 of 25 Hints left: 3
Q1

What will be the output of the following Python code? a=[1,2,3,4] b=[sum(a[0:x+1]) for x in range(0,len(a))] print(b)

  • A
  • B
  • C
  • D