akleemans / aoc-practice

Practicing old AoC events (2015-2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aoc-practice

Practicing old AoC events (2015-2021)

Learned along the way

Copy list and add an element (2015 Day 9)

new_list = old_list + [4]

Replace character in string at certain position (2015 Day 11)

l = list('foo')
l[1] = 'i'
s = ''.join(s)

Check type of variable for a JSON parser (2015 Day 12)

if isinstance(node, int):
    ...
elif isinstance(node, str):
    ...
elif isinstance(node, list):
    ...
elif isinstance(node, dict):
    ...

About

Practicing old AoC events (2015-2021)


Languages

Language:Python 100.0%