26
macfreek
10 25 47
3381/ 3945
Last seen 12 months ago
Member for 11 years, 4 months, 21 days
Difficulty Normal
Physicist by education. Network specialist by profession. Amateur programmer by hobby.

Missions (137) / Solutions (112)
Best solutions / Newest solutions
Home
Use itertools.pairwise & list concatenation
Changing direction
itertools.pairwise
pairwise
itertools
inline-if
print
6
regexp
Three Words
re.search
search
r-string
re
bool
strptime & string formatting
Date and Time Converter
datetime.strptime
strptime
datetime.datetime
format
datetime
First
Non-unique Elements
add
enumerate
set
or
in
First
Even the Last
IndexError
except
try
sum
list-comp
Electronic Station
S*L*O*W
Mathematically Lucky Tickets
ZeroDivisionError
eval
itertools.product
product
operator
2
List comprehension + reduce
Digits Multiplication
functools.reduce
reduce
functools
lambda
if-comprehension
Loopy Loop
Find Sequence
zip
min
None
inline-if
print
Filter, sort, compare
Verify Anagrams
lower
sorted
if-comprehension
list-comp
comprehension
1
Simple stack
Brackets
IndexError
pop
except
try
in
1
Scientific Expedition
Remove Mn chars after NFD normalization
Remove Accents
category
unicodedata.category
normalize
unicodedata.normalize
unicodedata
zip
The Hidden Word
itertools.zip_longest
zip_longest
splitlines
ValueError
pass
First
Morse Clock
translate
divmod
format
bin
list-comp
First
Absolute Sorting
abs
sorted
Use set.intersection
Pangram
intersection
set
lower
len
First
Striped Words
findall
re.findall
r-string
upper
pop
Set intersection
Common Words
set
sorted
join
split
list
First
The Most Wanted Letter
collections.Counter
Counter
collections
lower
sorted
2 big pros, 3 smaller cons
I Love Python!
O'Reilly
Exit checks
Parse Array
raise
is
ValueError
pass
continue
1
Very Fast!
Determine the Order
StopIteration
groupby
itertools.groupby
chain
itertools.chain
7
Fixed
Loading Cargo
yield
continue
None
abs
break
16
2
Match sequence patterns (incomplete)
Cipher Crossword
KeyError
chain
itertools.chain
yield
extend
First
Loading Cargo
combinations
itertools.combinations
itertools
abs
break
First
Flatten a List
TypeError
chain
itertools.chain
itertools
except
First
Xs and Os Referee
tuple
zip
list-comp
range
comprehension
First
Median
sorted
else
len
if
Mine
Depth first search with recursion
Disposable Teleports
yield
remove
enumerate
set
if-comprehension
1
First
What Is Wrong With This Family?
difference_update
KeyError
update
yield
dict-comp
2
Short
Binary Count
bin
count
First
Fizz Buzz
elif
else
str
if
Ice Base
Loop colomns in a quarter
Counting Tiles
math.ceil
ceil
math.sqrt
sqrt
math
2
1
All Math
Feed Pigeons
math.ceil
ceil
math
max
else
3
5
First
Largest Rectangle in a Histogram
set
max
else
for
if
18
Mark Pilgrim's library
Roman Numerals
VERBOSE
re.VERBOSE
class
Exception
raise
8
Plain
Morse Encoder
get
upper
join
list-comp
comprehension
First
The Most Numbers
ValueError
min
except
try
max
1
Use of Mark Pilgrims roman library
Reverse Roman Numerals
VERBOSE
re.VERBOSE
class
Exception
raise
Alice In Wonderland
Use ipaddress module
IP Network: Route Summarization
IPv4Network
ip_network
ipaddress.IPv4Network
ipaddress.ip_network
ipaddress
5
BFS with mutations
Digits Doublets
class
StopIteration
Exception
raise
yield
Breadth First Search
The Shortest Knight's Path
continue
pop
index
None
while
First
Transposed Matrix
list-comp
range
comprehension
len
if
GitHub
Simple math
Area of a Convex Polygon
abs
range
len
for
2
2
First
The End of Other
endswith
enumerate
sorted
False
True
py-rangeset library
Painting Wall
issuperset
hash
classmethod
class
issubset
First
Solution for Anything
class
True
Re-useable code
Open Labyrinth
__init__
collections.__init__
UserList
collections.UserList
class
Dropbox
Using difflib
The Longest Palindromic
SequenceMatcher
difflib.SequenceMatcher
difflib
None
len
2
1
First
Friendly Number
abs
break
while
int
len
15
First
Three Points Circle
eval
endswith
format
round
str
17
2
First
Speech Module
Exception
raise
divmod
print
join
Clear & fast
Numbers Factory
while
elif
int
str
for
4-line solution with difflib
The Longest Palindromic
SequenceMatcher
difflib.SequenceMatcher
difflib
None
len
PyCon TW
First
Double Substring
SequenceMatcher
difflib.SequenceMatcher
difflib
None
max
2
Clear, but lengthy
Unfair Districts
Enum
enum.Enum
difference_update
enum
class
8
Straightforward
Building Visibility
add
sort
enumerate
break
set
20
Simple addition
How Much Gold
Fraction
fractions.Fraction
fractions
extend
items
A*
Express Delivery
__init__
collections.__init__
UserList
collections.UserList
class
First
Golden Pyramid
enumerate
max
list-comp
comprehension
len
Find, expand and mark islands
Calculate Islands
update
pass
add
continue
IndexError
Three formulas
Simple Areas
raise
math.pi
pi
math
elif
First
Network Attack
math.inf
inf
math
min
max
First
House Password
digits
string.digits
ascii_uppercase
string.ascii_uppercase
ascii_lowercase
1
Storage
Coordinate transform
Square Spiral
AssertionError
raise
divmod
math.sqrt
sqrt
5
Generic: works for all primes
Restricted Prime
StopIteration
raise
yield
is
pop
6
All 128 states
Haunted House
KeyError
divmod
yield
pass
format
9
Dijkstra algorithm
Digging a Canal
__init__
collections.__init__
UserList
collections.UserList
class
17
Poor BFS
Haunted House
yield
insert
format
remove
continue
Too complicated
The Rows of Cakes
fractions.gcd
class
gcd
KeyError
fractions
zip_longest
Word Pattern
ascii_letters
string.ascii_letters
itertools.zip_longest
zip_longest
digits
3
First
Skew-symmetric Matrix
False
True
range
len
for
With notes
Weak Point
zip
index
min
sum
list-comp
HubSpot
bin, zip, map, xor, sum
The Hamming Distance
operator.xor
xor
itertools.zip_longest
zip_longest
operator
1
Simple: just go through it in order, twice
Auto Painting
min
join
list-comp
range
comprehension
Recursive
Restricted Sum
else
len
if
First
Number Base
ValueError
except
try
int
Blizzard
7 strategies
Sudoku Solver
UserList
collections.UserList
repr
class
hasattr
1
5
Backslash magic
Palindromic Palindrome
lambda
5
2
Region detection
Radiation Search
continue
pop
None
while
False
9
Second, fixed
Stair Steps
max
for
First
Spaceship Landing Strip
enumerate
break
in
False
list-comp
With exceptions too
Min and Max
StopIteration
TypeError
raise
iter
next
9
First
Weekend Counter
int
First
The Angles of a Triangle
math.acos
acos
math.pi
pi
round
Improved, with exceptions
Min and Max
StopIteration
TypeError
raise
iter
next
Rock
BFS
Water Jars
class
StopIteration
Exception
raise
yield
15
First
CheckSum
reversed
ord
continue
not
lower
Variant of Newton approximation, works for almost any input number
Super Root
math.exp
exp
math.log
log
math.ceil
Lamber W function, with poor accuracy method
Super Root
math.exp
exp
math.log
log
math
Shelter
Overengineered
Completely Empty
id
TypeError
iter
yield
enumerate
Eerie and unreadable
Ghosts Age
next
yield
enumerate
while
True
Codeship
Fast, clear
Pearls in the Box
collections.Counter
Counter
values
dict-comp
items
9
Suurballe algorithm
Snake Lite
__init__
collections.__init__
UserList
collections.UserList
class
10
2
Four strategies
Minesweeper
randint
random.randint
mul
operator.mul
random
13
Another BFS
8 Puzzle
class
StopIteration
Exception
chain
itertools.chain
19
Dijkstra/A*
Bats Bunker
__init__
collections.__init__
UserList
collections.UserList
class
Brute force
The Square Chest
raise
ValueError
or
inline-if
False
Hermit
First
Colder-Warmer
random.choice
choice
random
itertools.product
product
3
Recursive two-tuple iterator
Reverse Engineer
randint
random.randint
ZeroDivisionError
random
Fraction
5
Generic BFS puzzle
Anagrams By Stacks
class
StopIteration
Exception
raise
yield
First
Keywords Finder
find
continue
sort
pop
break
Dumb brute force
Ore In The Desert
abs
if-comprehension
False
True
list-comp
Assumes 4-bit wide chars
Mono Captcha
zip
inline-if
sorted
append
list-comp
Brute force
The Good Radix
ValueError
pass
except
try
range
Watchtower
Brute force, smart order
Numbered Triangles
chain
itertools.chain
combinations
itertools.combinations
yield
1
6
Wikibooks is my friend
Convex Hull
reversed
enumerate
pop
set
sorted
11
Dumb brute force
Bulls and Cows
itertools.permutations
permutations
filter
itertools
zip
20
1
Solve it in your sleep()
Funny Addition
perf_counter
time.perf_counter
sleep
time.sleep
time
1
Brute force
Number Guess
filter
zip
break
lambda
range