# Python Utilities by Peter Norvig

DevFeed: [Python Utilities by Peter Norvig](<https://devfeed.tech/articles/python-utilities-by-peter-norvig-31838.md>)

Original publisher: [Read original article](<https://www.metachris.dev/2016/12/peter-norvigs-python-utilities-advent-of-code/>)

Author: Chris Hager

Published: 2016-12-27T00:00:00Z

Content type: article

Language: en

Sources: [Chris Hager](<https://devfeed.tech/sources/chris-hager.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Advent of Code](<https://devfeed.tech/topics/advent-of-code.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [advent-of-code](<https://devfeed.tech/tags/advent-of-code.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

The article presents Python utility functions from Peter Norvig's Advent of Code work, including imports and an input-file helper, and points readers to the full post for further solutions.

## Source excerpt

Peter Norvig, the famous American computer scientist and Director of Research at Google Inc., participated in this year's Advent of Code (a series of small programming puzzles), and shared his experience in an interesting blog post. The post starts with this amazing collection of Python utility functions, which may also be useful for your next project: # Python 3.x import re import numpy as np import math import urllib.request from collections import Counter, defaultdict, namedtuple, deque from functools import lru_cache from itertools import permutations, combinations, chain, cycle, product from heapq import heappop, heappush def Input(day): "Open this day's input file.