Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Advent of Code
#9
(Dec-05-2022, 08:08 PM)deanhystad Wrote:
(Dec-05-2022, 07:53 PM)astral_travel Wrote: i need to create a sum of the chunks of numbers (chunks = the numbers between the separators).
And why do you need a list for that?

okay, you're right, i don't...
but i just don't know how to sum the chunks...i wrote a lil more code in the message above..

if it's one long array of numbers you simply use sum() and that's it....but sum() doesn't work when you're trying to add up the numbers up to the delimiter...
Reply


Messages In This Thread
Advent of Code - by astral_travel - Dec-05-2022, 06:36 PM
RE: Advent of Code - by deanhystad - Dec-05-2022, 06:48 PM
RE: Advent of Code - by astral_travel - Dec-05-2022, 06:49 PM
RE: Advent of Code - by rob101 - Dec-05-2022, 07:07 PM
RE: Advent of Code - by deanhystad - Dec-05-2022, 07:31 PM
RE: Advent of Code - by astral_travel - Dec-05-2022, 08:09 PM
RE: Advent of Code - by astral_travel - Dec-05-2022, 07:53 PM
RE: Advent of Code - by deanhystad - Dec-05-2022, 08:08 PM
RE: Advent of Code - by astral_travel - Dec-05-2022, 08:12 PM
RE: Advent of Code - by deanhystad - Dec-05-2022, 08:40 PM
RE: Advent of Code - by astral_travel - Dec-05-2022, 09:06 PM
RE: Advent of Code - by snippsat - Dec-05-2022, 09:41 PM
RE: Advent of Code - by deanhystad - Dec-05-2022, 09:50 PM
RE: Advent of Code - by snippsat - Dec-05-2022, 09:58 PM
RE: Advent of Code - by astral_travel - Dec-05-2022, 10:06 PM
RE: Advent of Code - by deanhystad - Dec-05-2022, 11:49 PM
RE: Advent of Code - by astral_travel - Dec-06-2022, 04:47 PM
RE: Advent of Code - by deanhystad - Dec-06-2022, 05:10 PM
RE: Advent of Code - by astral_travel - Dec-06-2022, 05:37 PM
RE: Advent of Code - by deanhystad - Dec-06-2022, 05:37 PM
RE: Advent of Code - by astral_travel - Dec-06-2022, 05:54 PM
RE: Advent of Code - by deanhystad - Dec-06-2022, 06:27 PM
RE: Advent of Code - by astral_travel - Dec-06-2022, 06:50 PM
RE: Advent of Code - by deanhystad - Dec-06-2022, 07:38 PM
RE: Advent of Code - by snippsat - Dec-06-2022, 07:50 PM
RE: Advent of Code - by astral_travel - Dec-06-2022, 08:41 PM
RE: Advent of Code - by deanhystad - Dec-06-2022, 09:19 PM
RE: Advent of Code - by astral_travel - Dec-06-2022, 09:35 PM
RE: Advent of Code - by deanhystad - Dec-06-2022, 09:53 PM
RE: Advent of Code - by astral_travel - Dec-07-2022, 05:14 PM

Forum Jump:

User Panel Messages

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