40
David_Jones
12 29 40
10293/ 10664
David Jones
Last seen 3 years ago
Member for 5 years, 19 days
Difficulty Normal
Missions (349) / Solutions (242)
Best solutions / Newest solutions
Initiation
str.find(sub, start)
Between Markers (simplified)
find
1
1
str.split()
First Word (simplified)
split
4
5
generators
Easy Unpack
tuple
comprehension
6
2
all(iterable)
All the Same
all
range
comprehension
len
11
lambda
Nearest Value
min
abs
lambda
15
2
yield
Replace First
yield
range
len
for
if
1
str.isdigit()
Sum Numbers
isdigit
sum
if-comprehension
split
comprehension
len(s)
Acceptable Password I
len
operator.mul(a, b)
Multiply (Intro)
mul
operator.mul
operator
2
string slicing
Backward String
str.join(iterable)
Correct Sentence
upper
join
append
list
if
1
bool([x])
Is Even
bool
not
2
str.lstrip([chars])
Beginning Zeros
lstrip
len
2
straightforward
End Zeros
while
str
textwrap.wrap(text, width=2)
Split Pairs
textwrap.wrap
wrap
textwrap
len
all(iterable)
All Upper I
all
isupper
isalpha
if-comprehension
comprehension
len(s)
Number Length
str
len
str(object)
Max Digit
max
int
str
str.isdigit()
Count Digits
isdigit
sum
comprehension
try ... except
Remove All Before
yield
ValueError
index
except
try
Home
str.split(sep=' ')
Backward Each Word
join
split
comprehension
1
24
dict
Popular Words
dict-comp
lower
in
split
comprehension
1
3
Slices
Split List
len
2
str.find(sub, start)
Second Index
find
None
inline-if
if
5
1
sorting by multiple criteria
Sort Array by Element Frequency
extend
collections.Counter
Counter
collections
enumerate
7
First
Morse Decoder
capitalize
join
split
comprehension
7
First
Sun Angle
round
map
split
int
if
8
str.replace(old, new)
First Word
replace
split
10
1
boolean operations
Even the Last
or
sum
10
1
str.find(sub)
Between Markers
find
inline-if
len
if
lambda expression
Bigger Price
lambda
sorted
First
Three Words
isalpha
False
True
split
else
datetime.datetime
Days Between
datetime.datetime
datetime
abs
1
generator function
Pawn Brotherhood
yield
chr
ord
bool
set
2
str.replace(old, new)
Right to Left
replace
join
comprehension
1
collections.Counter
Non-unique Elements
collections.Counter
Counter
collections
if-comprehension
list-comp
1
Electronic Station
try ... except
Unix Match. Part 2
error
re.error
match
re.match
re
1
9
all(iterable)
Ascending List
all
range
comprehension
len
1
recursion
Mathematically Lucky Tickets
itertools.product
product
yield
all
itertools
4
set(iterable)
Acceptable Password VI
any
isdigit
set
not
lower
9
1
counting intersections
Inside Block
zip
min
max
or
and
9
re.match(pattern, string)
Unix Match. Part 1
match
re.match
re
replace
bool
11
1
itertools.combinations
Remove Brackets
combinations
itertools.combinations
reversed
values
itertools
15
3
functools.reduce
Digits Multiplication
functools.reduce
reduce
functools
lambda
or
17
1
str.isdigit()
Acceptable Password II
any
isdigit
and
comprehension
len
str.lower()
Acceptable Password V
any
isdigit
not
lower
or
1
dict
Surjection Strings
zip
in
False
and
True
stack
Brackets
values
dict
zip
pop
not
str.isdigit()
Acceptable Password IV
any
isdigit
not
or
and
str.split(sep='.')
Sort by Extension
f-string
not
or
inline-if
sorted
str.isdigit()
Acceptable Password III
any
isdigit
not
and
comprehension
collections.Counter
Verify Anagrams
collections.Counter
Counter
collections
replace
lower
1
str.isupper()
All Upper II
isupper
1
Scientific Expedition
type(object)
Sum by Type
type
int
for
3
5
sorted(iterable, key)
Absolute Sorting
abs
sorted
3
crystal-clear
Conversion from CamelCase
isupper
lower
join
append
else
4
2
slicing
Caps Lock
upper
map
join
split
str
4
3
jumping
Bird Language
while
in
elif
else
len
7
1
f-strings
Time Converter (24h to 12h)
f-string
split
int
if
14
1
First
Pangram
set
lower
collections.Counter
Follow Instructions
collections.Counter
Counter
collections
First
I Love Python!
1
str.title()
Conversion into CamelCase
title
replace
1
itertools.zip_longest
The Hidden Word
itertools.zip_longest
zip_longest
splitlines
itertools
find
1
sets
Common Words
set
sorted
join
split
collections.defaultdict
Call to Home
collections.defaultdict
defaultdict
values
collections
sum
collections.defaultdict
The Most Wanted Letter
collections.defaultdict
defaultdict
items
collections
ord
2
zfill
Morse Clock
zfill
divmod
bin
zip
map
1
str.join(iterable)
Secret Message
isupper
join
if-comprehension
comprehension
1
collections.deque
Letter Queue
collections.deque
deque
collections
join
elif
str.split(sep)
Goes Right After
in
False
and
split
if
O'Reilly
yield
Replace Last
yield
range
len
for
if
1
5
First
Median of Three
sorted
list-comp
range
comprehension
len
2
itertools.groupby(iterable)
Compress List
groupby
itertools.groupby
yield
itertools
for
3
9
yield
Remove All After
yield
for
if
3
1
recursion
The Flat Dictionary
update
isinstance
dict
items
not
4
1
max(iterable, default=0)
How Deep
type
is
tuple
map
max
7
yield from iterable
Reverse Every Ascending
reversed
not
append
range
else
19
set().union(*others)
Determine the Order
union
all
break
replace
set
19
recursion
Flatten a List
type
extend
is
int
for
collections.Counter
Frequency Sorting
collections.Counter
Counter
collections
lambda
sorted
1
list slices
Chunk
yield
range
len
for
list.count(x)
Majority
count
str.join(iterable)
Xs and Os Referee
join
in
list-comp
range
comprehension
4
ternary operators
Index Power
inline-if
len
1
statistics.median
Median
statistics.median
statistics
median
1
modified selection sort
Sort Except Zero
range
len
for
if
Incinerator
First
Geometry Figures
globals
class
math.pi
pi
round
1
First
Army Battles
class
property
super
decorator
extend
1
First
The Defenders
class
property
super
decorator
extend
1
First
The Vampires
class
property
super
decorator
extend
1
f-strings
Party Invitations
class
f-string
add
remove
set
3
keyword arguments
The Weapons
class
property
super
type
decorator
3
1
First
Capital City
class
super
type
is
None
3
class VoiceCommand(list)
Voice TV Control
class
super
isinstance
or
in
4
3
class Army(list)
The Lancers
class
property
super
type
decorator
4
class Army(list)
The Healers
class
property
super
type
decorator
6
class Army(list)
Straight Fight
class
property
super
type
decorator
6
2
keyword arguments
The Warriors
class
property
super
decorator
not
8
1
multiline f-strings
3 Chefs
class
super
f-string
None
8
copy.copy
Text Editor
copy.copy
class
copy
is
f-string
11
bin
Hacker Language
class
chr
bin
ord
isalpha
11
f-strings
Microwave Ovens
class
divmod
isinstance
f-string
pass
12
1
f-strings
Dialogues
class
f-string
join
in
append
13
keyword arguments
The Warlords
class
property
super
type
decorator
14
1
f-strings
Every Person is Unique
class
f-string
map
replace
split
19
1
multiline f-strings
Building Base
class
f-string
Mine
breadth-first search
Fast Train
collections.deque
deque
all
collections
sum
1
O(n) (using partial sums)
Can Balance
sum
range
comprehension
len
for
1
1
First
What Is Wrong With This Family?
collections.defaultdict
defaultdict
collections
set
not
1
formula
Achilles and the Tortoise
2
breadth-first search
Chess Knight
collections.deque
deque
itertools.product
product
yield
3
2
First
Cut Sentence
rfind
max
len
if
5
dict
Caesar Cipher (encryptor)
dict
zip
inline-if
join
in
10
1
dict.get(key)
Best Stock
get
max
17
1
globals()
The Einstein Problem-Lite
globals
itertools.product
product
all
itertools
2
math.gcd
The Greatest Common Divisor
math.gcd
gcd
functools.reduce
reduce
functools
1
bin
Binary Count
bin
count
1
str.join(iterable)
Fizz Buzz
inline-if
join
append
str
if
1
Ice Base
First
Monkey Typing
lower
sum
in
comprehension
2
1
O(N)
Largest Rectangle in a Histogram
pop
max
while
append
range
2
str.split
Find Quotes
split
3
str.join(iterable)
Morse Encoder
lower
join
comprehension
3
1
replacing
Roman Numerals
divmod
zip
replace
for
5
2
First
Long Repeat
max
not
range
else
len
18
depth-first search
How to Find Friends
collections.defaultdict
defaultdict
add
collections
pop
1
max(iterable, default=0)
The Most Numbers
min
max
Alice In Wonderland
itertools.accumulate
Flood Area
itertools.accumulate
accumulate
yield
ValueError
get
1
2
list.reverse()
Zigzag Array
reverse
list-comp
range
comprehension
for
3
calendar.weekday
When is Friday?
calendar.weekday
weekday
calendar
map
split
5
First
Multiplication Table
bin
map
count
len
6
breadth-first search
Digits Doublets
ne
operator.ne
collections.deque
deque
operator
7
1
First
Middle Characters
len
7
tuple assignment
Swap Nodes
range
len
for
11
1
breadth-first search
The Shortest Knight's Path
collections.deque
deque
itertools.product
product
yield
16
2
GitHub
urgent cells first
Xs and Os Champion
divmod
next
index
lambda
count
1
str.split
Cookies
split
2
Dijkstra's algorithm
The Cheapest Flight
math.inf
inf
collections.defaultdict
defaultdict
get
3
2
generators
Expand Intervals
yield
range
for
4
1
depth-first search
Power Supply
collections.defaultdict
defaultdict
add
items
collections
4
zip
Create Intervals
zip
sorted
append
list
for
6
4
calendar module
The Most Frequent Weekdays
calendar.isleap
isleap
calendar.day_name
day_name
calendar.weekday
8
math.gcd
Evenly Spaced Trees
math.gcd
gcd
yield
functools.reduce
reduce
10
math.hypot
Shooting Range
math.hypot
hypot
round
math
inline-if
12
str.startswith(prefix)
The End of Other
startswith
any
sorted
range
comprehension
14
Dropbox
textwrap.wrap
Text Formatting
textwrap.wrap
wrap
textwrap
rjust
divmod
1
3
tuple assignment
Hubspot Amulet
and
range
for
if
1
recursion
Nonogram Row
all
zip
pop
None
not
3
generator function
URL Normalization
startswith
yield
endswith
chr
upper
5
1
First
Humpty Dumpty Form
math.atanh
atanh
math.asin
asin
math.pi
7
First
Worth of Words
max
lambda
sum
comprehension
7
getattr
Simple Hashlib
getattr
hashlib
15
1
formatting with nested curly braces
Friendly Number
math.log
log
format
math
min
1
First
Speech Module
divmod
join
elif
append
else
collections.deque
Numbers Factory
collections.deque
deque
collections
inline-if
join
PyCon TW
from the nearest to the farthest
Building Visibility
lambda
sorted
False
True
range
1
2
max with default
Double Substring
max
count
if-comprehension
range
comprehension
3
1
zip(*iterables)
Ryerson Letter Grade
zip
split
for
if
8
extended iterable unpacking
Digit Stack
pop
elif
append
split
int
1
dynamic programming
Golden Pyramid
map
max
range
list
len
1
math.pi
Simple Areas
math.pi
pi
round
math
sum
1
any(iterable)
House Password
islower
any
isupper
isdigit
comprehension
1
itertools.groupby(iterable)
Sum Consecutives
groupby
itertools.groupby
itertools
sum
comprehension
1
Storage
all(iterable)
Skew-symmetric Matrix
all
range
comprehension
len
1
crystal-clear
Earth Distances
math.radians
radians
math.cos
cos
math.sin
2
One-liner
Word Pattern
isalpha
join
comprehension
int
3
1
First
Square Spiral
divmod
abs
int
if
3
dict.fromkeys
Playfair Cipher
fromkeys
isalnum
keys
set
lower
3
First
Saw the Stick
inline-if
sum
in
list-comp
range
4
itertools.combinations
The Rows of Cakes
frozenset
combinations
itertools.combinations
add
itertools
5
pow(x, y, modulo)
Restricted Prime
pow
not
lambda
while
False
6
re.findall(pattern, string)
Moria Doors
reversed
findall
re.findall
re
min
11
zip
Weak Point
zip
index
min
sum
list-comp
Maya
connecting the shortest bridges first
Signpost
itertools.product
product
collections.defaultdict
defaultdict
add
2
collecting the nearest gem, using BFS and avoiding the dead ends
Inertia
collections.deque
deque
itertools.product
product
set-comp
8
HubSpot
First
Node Disconnected Users
dict-comp
add
pop
set
sum
1
depth-first search
City's Happiness
values
dict-comp
add
dict
min
2
breadth-first search
Supply Line
collections.deque
deque
yield
chr
add
3
precounting
Square Board
elif
range
else
for
if
5
1
depth-first search
New Cities
collections.defaultdict
defaultdict
add
collections
set
9
divmod(a, b)
Repeating Decimals
divmod
index
break
while
in
9
str.join
Auto Painting
map
min
join
range
comprehension
16
str.splitlines([keepends])
Non Empty Lines
splitlines
strip
map
bool
sum
17
recursion
Restricted Sum
pop
inline-if
try ... except
Number Base
ValueError
except
try
int
1
Blizzard
sets
Rectangles Union
set-comp
range
comprehension
len
1
datetime.datetime
The First Working Day
datetime.strptime
strptime
datetime.timedelta
timedelta
datetime.datetime
2
recursion
Permutation Index
math.factorial
factorial
math
not
sum
3
Dijkstra's algorithm
Useless Flights
math.inf
inf
collections.defaultdict
defaultdict
dict-comp
4
depth-first search
Radiation Search
set-comp
remove
pop
while
in
5
First
Stressful Subject
endswith
isupper
isalpha
lower
or
8
First
Min and Max
get
sorted
True
len
if
17
date.toordinal()
Weekend Counter
sum
range
comprehension
1
Rock
First
Most Efficient Cutting
math.inf
inf
itertools.permutations
permutations
itertools
1
First
Super Root
abs
while
else
if
3
crystal-clear
Parity Bit Generator
chr
bin
count
join
if-comprehension
5
2
recursion
Berserk Rook
chr
ord
break
max
not
6
1
datetime
Web Log Sessions
splitlines
datetime.strptime
strptime
collections.defaultdict
defaultdict
6
1
First
CheckSum
reversed
ord
map
set
inline-if
6
Shelter
First
The Nearest Square Number
round
1
itertools.product(*iterables)
Pattern Recognition
itertools.product
product
all
itertools
range
1
1
First
Completely Empty
TypeError
all
map
except
try
1
itertools
ADFGVX Cipher
fromkeys
itertools.zip_longest
zip_longest
itertools.product
product
4
collections.defaultdict
One line Drawing
collections.defaultdict
defaultdict
add
collections
remove
13
3
frozensets
Seven Segment
frozenset
add
upper
map
isupper
First
Ghosts Age
range
else
for
if
Codeship
depth-first search
Eaten Go Stones
itertools.product
product
add
itertools
remove
1
depth-first search
The Territory of Go
itertools.product
product
yield
add
itertools
1
itertools.combinations_with_replacement(iterable, r)
Unfair Dice
combinations_with_replacement
itertools.combinations_with_replacement
itertools.product
product
itertools
2
2
@functools.lru_cache
Probably Dice
functools.lru_cache
lru_cache
decorator
functools
None
5
1
itertools.product(*iterables)
Minesweeper
itertools.product
product
is
itertools
elif
5
1
formula
Pearls in the Box
round
count
len
7
1
breadth-first search
The 88th Puzzle
collections.deque
deque
add
collections
zip
7
itertools.chain
The Square Chest
chain
itertools.chain
set-comp
all
itertools
Hermit
O(sqrt(N))
Count Consecutive Summers
and
range
int
for
2
depth-first search
Network Loops
collections.defaultdict
defaultdict
add
collections
pop
3
int(str, radix)
The Good Radix
max
range
int
for
if
5
fractions.Fraction
Fractions Addition
Fraction
fractions.Fraction
fractions
divmod
f-string
5
itertools.product(*iterables)
Break Rings
itertools.product
product
itertools
min
set
1
Watchtower
counting connected components
Boundary Blocks
set-comp
yield
add
remove
set
1
First
Rotate Hole
all
if-comprehension
list-comp
range
comprehension
8
probing
Magic Square
chain
itertools.chain
divmod
filter
ValueError
10
First
Funny Addition
sum
18
Escher
First
Wild Dogs
collections.defaultdict
defaultdict
values
round
collections
1
First
Compass, Map and Spyglass
enumerate
abs
max
sum
comprehension
1
First
Treasures
f-string
items
min
lambda
sorted
1
First
The Secret Room
divmod
strip
index
sorted
join
1
O(N), where N is number of cubes
The Tower
collections.defaultdict
defaultdict
values
collections
max
1
depth-first search
Graphical Key
collections.defaultdict
defaultdict
add
collections
remove
3
First
The Ship Teams
items
sorted
append
else
for
4
enumerate
Ground for the House
splitlines
strip
enumerate
min
max
5
1
depth-first search
The Buttons
splitlines
strip
add
pop
set
6
depth-first search
Hypercube
pop
not
lower
False
and
7
dynamic programming
The Stones
any
and
range
comprehension
for
12
1
greedy algorithm
Card Game
set-comp
remove
sorted
in
elif
14
1
normalizing
Keys and Locks
splitlines
reversed
strip
all
zip
14
try ... except
Safe Code
eval
pass
replace
except
try
17
zip
The Stone Wall
splitlines
strip
zip
enumerate
count
Not On Map
divmod(a, b)
Base change - Position System
divmod
while
13