2014-07-31 11:43:08 +0200 | received badge | ● Famous Question (source) |
2013-11-07 10:59:04 +0200 | received badge | ● Notable Question (source) |
2013-08-08 10:03:12 +0200 | received badge | ● Popular Question (source) |
2012-08-26 18:31:51 +0200 | received badge | ● Scholar (source) |
2012-08-26 18:31:51 +0200 | marked best answer | Noob question about lists in sum() You can always do or The second version works more generally: |
2012-08-26 18:30:58 +0200 | received badge | ● Supporter (source) |
2012-08-26 18:16:16 +0200 | commented answer | Noob question about lists in sum() Me idiot! It sure does! I just somehow ... didn't recognize that on my first read. So thx you two and sry for wasting your time by being temporarily illiterate. |
2012-08-26 14:53:52 +0200 | received badge | ● Editor (source) |
2012-08-26 14:50:47 +0200 | answered a question | Noob question about lists in sum() [edit]My following answer is dumb due to not properly reading the first answer[/edit] Thanks for your answer! The thing is that I actually want to use a list of measured values, so dings would not be a list of following integers (like range(1,5)), but some (real) numbers, for example dings = [1.2438, 1.2473, 1.2398] just with more than 3 numbers. So I do need to use a list in a sum context. I could write it with a for loop (and did, which worked), but I really want to use a sum. |
2012-08-26 12:48:00 +0200 | asked a question | Noob question about lists in sum() Hi there, I have a (presumably) very easy question: works, but does not. Error Message: So I tried writing it with dings[int(k)], didn't work either. Why? Thanks! |