Python Forum
simulating sum function on LIST
Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simulating sum function on LIST
#3
Thanks Skaperen..It worked.. Big Grin
#final code
def sum2(data):
    a=0
    for i in data:
        a=a+i
    return a
Reply


Messages In This Thread
simulating sum function on LIST - by vvv - Feb-25-2017, 06:41 AM
RE: simulating sum function on LIST - by Skaperen - Feb-25-2017, 06:53 AM
RE: simulating sum function on LIST - by vvv - Feb-25-2017, 06:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I created a function that generate a list but the list is empty in a new .py file mrhopeedu 2 2,326 Oct-12-2019, 08:02 PM
Last Post: mrhopeedu
  Simulating events using Hawkes akshit2291 1 2,148 Sep-25-2018, 04:17 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020