Day 7: Camel Cards [AOC2023 Python] @0xdf
Day 7: Camel Cards [AOC2023 Python]  @0xdf
Uploaded December 2023 | Updated November 2026, 3 hours ago
For Advent of Code 2023 Day7, I'm given a series of poker hands that I need to rank. The rules are a simplified version of poker. I'll use a Hand class, along with some neat static methods. In part 2, there are wildcards to handle, which I'll brute force every possible hand to get the best hand.

Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/7

☕ Buy Me A Coffee: buymeacoffee.com/0xdf

#adventofcode #python

[00:00] Part 1 description
[01:52] Input analysis
[02:25] Create Hand class
[03:44] Getting hand type
[08:01] Testing hand type
[10:34] Adding __eq__ and __gt__
[14:46] Testing comparison
[15:07] Scoring hands
[16:10] Fixing bug in hand_type
[17:02] Part 2 description
[17:19] Strategies
[17:49] Updating card_map
[18:53] Reorganizing get_hand_type
[20:40] replace_wilds
[23:16] Testing replace_wilds
[24:02] Getting best hand_type
[25:08] Scoring part 2
[26:05] Solve part 2
[12:53] Brute force solution
Day 7: Camel Cards [AOC2023 Python]Bypassing Python Filters [Code - HackTheBox]Reversing APT29 Duke MalwareDay 9: Mirage Maintenance [AOC2023 Python]Paper Shreds Easter Egg [Sans Holiday Hack 2024]Brute Forcing AES-ECB with Emoji [Hackvent 2022 - Day 20]PHPs Unsafe parse_url Function [Encoding - HackTheBox]ffuf Auto Calibration DemystifiedWriting a Webshell Joomla Plugin [HackTheBox - DevVortex]Laboratories [AOC2025 Day 7]NeoVault - HackTheSystem CTFPlaying with Jenkins File Read [CVE-2024-23897]
0xdf |

Day 7: Camel Cards [AOC2023 Python]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER