Question: change this code to a simpler and clearer code that performs the same task as the given cod L = [2, 4, 6, 8] total
change this code to a simpler and clearer code that performs the same task as the given cod
L = [2, 4, 6, 8] total = 0 while L != []: total += L[0] L = L[1:] print (total)
Step by Step Solution
3.39 Rating (161 Votes )
There are 3 Steps involved in it
Simplify and make the code clearer by using a for loop ... View full answer
Get step-by-step solutions from verified subject matter experts
