(If there are threads specifically related to one lesson please let me know - couldn’t find anything on first glance:
Lesson I am currently on: Carly’S Clippers
I am trying to assign the sum of numbers in a list to a variable and wondered if I could solve this in one line. I tried:
total_prices += price for price in prices #where prices is the list of number
and I am not sure what part of the syntax is troublesome here.
PS: I am aware of the sum() function, I was just wondering if I could manually solve that function in one line…