I’m Doing the Advent of Code 2024 in Python — Day 4 | by Soner Yıldırım | Dec, 2024

Editor
1 Min Read


Let’s see how many stars we’ll collect.

Photo by Nong on Unsplash

Welcome to Day 4!

  • Day 1 for introduction, how to get the input for your own puzzle, and solutions to the first day’s puzzles.
  • Day 2, Day 3

We’ll learn about the following topics in the puzzle for Day 4:

  • List comprehension in Python
  • How to work with one-dimensional and two-dimensional NumPy arrays
  • How to transpose and flip NumPy arrays

As of writing this article, 22 puzzles have been released and each puzzle has two parts. Each part counts for a start and here is my current progress:

(image by author)

The puzzle input for Day 4 is a long string that contains the letters X, M, A, and S. The first 10 lines of my puzzle input looks like this:

(image by author)
Share this Article
Please enter CoinGecko Free Api Key to get this plugin works.