Feb-02-2019, 10:24 PM
I want to make a list which contains other lists in the following pattern:
List=[[1],[1,2],[1,2,3]] etc
the second part is to find sum of each sublist and print a message
like "The first elment of the list is [1] with sum 1"
"The second element of the list is [1,2] with sum 3"
Etc
Thats what this exercise is about
List=[[1],[1,2],[1,2,3]] etc
the second part is to find sum of each sublist and print a message
like "The first elment of the list is [1] with sum 1"
"The second element of the list is [1,2] with sum 3"
Etc
Thats what this exercise is about