Seishin's Life
  • Home
  • About Me
Sign in Subscribe

day4

Advent of Code 2022 Day 4: Camp Cleanup Solutions

Advent of Code 2022 Day 4: Camp Cleanup Solutions

It's day 4 of the AoC and here is my solution to the Camp Cleanup puzzle: with open('input', 'r') as file: items = list(file.read().split('\n')) grouped = [[]] for item in items: grouped.append([]) if (item == "") else grouped[len( grouped) - 1].append(int(item)) def solution_1(
Atanas Dimitrov Dec 4, 2022

Subscribe to Seishin's Life

Don't miss out on the latest news. Sign up now to get access to the library of members-only articles.
  • Sign up
Seishin's Life © 2023. Powered by Ghost