26
ddavidse
5 21 44
3722/ 3945
Last seen 1 year ago
Member for 3 years, 6 months, 26 days
Difficulty Normal
Applied Physics master student

Missions (230) / Solutions (256)
Best solutions / Newest solutions
Initiation
Max Digit - improved
Max Digit
max
list-comp
comprehension
int
str
re.findall()
Beginning Zeros
findall
re.findall
re
int
str
Count Digits
Count Digits
isnumeric
lambda
sum
list-comp
comprehension
1
Oneliner
Acceptable Password I
lambda
len
Ignore this solution
Multiply (Intro)
UnicodeEncodeError
RecursionError
ImportError
contextlib.suppress
suppress
2
All Upper I - improved
All Upper I
upper
lambda
Backward String
Backward String
str
1
Is Even
Is Even
lambda
End Zeros - improved again
End Zeros
break
while
else
int
str
Sum Numbers
Sum Numbers
isdigit
lambda
sum
if-comprehension
list-comp
1
First
Count Digits
isnumeric
int
str
for
if
Between Markers (s)
Between Markers (simplified)
find
lambda
Beginning Zeros - improved
Beginning Zeros
break
else
int
str
for
1
Replace First - improved
Replace First
typing.Iterable
Iterable
typing
list
else
First
Nearest Value
break
set
while
in
elif
2
First Word (simplified) - improved
First Word (simplified)
lambda
split
2
Acceptable Password I - improved
Acceptable Password I
bool
inline-if
False
True
str
2
Number Length - improved
Number Length
lambda
str
len
1
First
Correct Sentence
upper
str
if
1
End Zeros - improved
End Zeros
break
except
try
while
True
2
Replace First - shortest
Replace First
lambda
inline-if
1
Remove All Before - improved
Remove All Before
index
typing.Iterable
Iterable
typing
in
1
Backward String - improved
Backward String
lambda
1
Split Pairs - improved
Split Pairs
format
break
while
elif
append
Easy Unpack - improved
Easy Unpack
tuple
2
All the Same - improved
All the Same
all
lambda
list-comp
comprehension
itertools.groupby()
The Most Frequent
groupby
itertools.groupby
itertools
lambda
list
Multiply (Intro) - improved
Multiply (Intro)
lambda
1
Better solution
Correct Sentence
upper
inline-if
str
1
Home
First
Sun Angle
round
or
and
else
int
Popular Words
Popular Words
dict-comp
lower
count
split
comprehension
Morse Decoder - improved
Morse Decoder
capitalize
list-comp
split
comprehension
for
Commented
Missing Number
sort
min
while
True
list-comp
First
Split List
list
else
int
len
if
commented
Changing direction
elif
range
else
int
len
I couldn't find a less boring way to solve this
Duplicate Zeros
append
list
else
for
if
First
Date and Time Converter
format
inline-if
int
str
2
Bigger Price
Bigger Price
sort
lambda
True
1
Between Markers
Between Markers
find
inline-if
str
len
3
Split List - better solution
Split List
math.ceil
ceil
math
list
len
regexp
Three Words
re.search
search
r-string
re
lower
Element Frequency - improved
Sort Array by Element Frequency
copy
sort
index
lambda
count
Just checking the "OrderedDict" box
Sort Array by Element Frequency
OrderedDict
collections.OrderedDict
collections
sort
lambda
just checking the "namedtuple" box
Sort Array by Element Frequency
collections.namedtuple
namedtuple
collections
sort
index
re.split()
First Word
re.split
re
if-comprehension
list-comp
split
1
Three Words
Three Words
isalpha
bool
False
True
split
1
First
Sort Array by Element Frequency
index
max
append
range
len
Days Between
Days Between
date
datetime.date
datetime
abs
lambda
Oneliner
Even the Last
enumerate
lambda
inline-if
sum
if-comprehension
Right to Left
Right to Left
replace
lambda
join
Three Words - improved
Three Words
isalpha
bool
False
True
split
Backward Each Word
Backward Each Word
lambda
join
list-comp
split
comprehension
1
First
Second Index
find
None
else
int
str
2
re.finditer()
Second Index
finditer
re.finditer
re
None
except
Even the Last
Even the Last
enumerate
sum
if-comprehension
list-comp
list
2
Sun Angle - reduced
Sun Angle
round
or
and
else
int
2
Non-unique Elements
Non-unique Elements
lambda
count
if-comprehension
list-comp
comprehension
Pawn Brotherhood
Pawn Brotherhood
chr
ord
set
or
in
Electronic Station
First
Remove Brackets
isinstance
items
index
break
not
1
A mess but it works ¯\_(ツ)_/¯
Mathematically Lucky Tickets
time.time
time
itertools.permutations
permutations
eval
6
Ignore this solution
Words Order
KeyError
raise
next
yield
ValueError
Unix Match, part 1
Unix Match. Part 1
find
bool
not
count
elif
4
Inside Block
Inside Block
Ellipsis
Tuple
typing.Tuple
min
bool
First
Verify Anagrams
lower
sorted
join
split
First
Surjection Strings
bool
count
False
append
True
Loops, loops
Can You Pass?
is
remove
abs
break
not
First
All Upper II
upper
bool
lower
False
else
1
First
Similar Triangles
Tuple
typing.Tuple
math.sqrt
sqrt
round
2
First
Sort by Extension
List
typing.List
break
typing
sorted
First
Find Sequence
List
typing.List
bool
typing
False
short solution with re.sub()
Brackets
re.sub
sub
r-string
re
not
Scientific Expedition
One of the better solutions I've come up with
Morse Clock
format
bin
replace
inline-if
join
15
solution using re.sub()
YAML. More Types
capitalize
isnumeric
copy
re.sub
sub
16
it's not stupid if it works
Convert and Aggregate
keys
dict
tuple
pop
break
1
Second solution [2022]
YAML. More Types
isnumeric
strip
dict-comp
keys
None
The shortest I can do
Caps Lock
upper
not
inline-if
False
else
Remove Accents
Remove Accents
category
unicodedata.category
normalize
unicodedata.normalize
unicodedata
1
My motivation
I Love Python!
re.sub()
Bird Language
re.sub
sub
r-string
re
2
Letter Queue
Letter Queue
List
typing.List
pop
typing
join
2
Time Converter
Time Converter (24h to 12h)
else
int
str
if
weird exercise but ok
Caps Lock
upper
except
try
lower
join
The Hidden Word
The Hidden Word
pass
find
except
try
lower
Fast solution using set
Pangram
set-comp
isalpha
lower
inline-if
if-comprehension
Goes Right After
Goes Right After
find
bool
or
elif
False
simple indeed
YAML. Simple Dict
isnumeric
re.sub
sub
strip
dict-comp
First
Remove Accents
category
unicodedata.category
normalize
unicodedata.normalize
unicodedata
a little proud of this one
Cipher Map
numpy.zeros
zeros
numpy
as
List
Sum by Type
Sum by Type
Tuple
typing.Tuple
isinstance
typing
elif
Conversion into CamelCase
Conversion into CamelCase
pass
upper
join
elif
append
swapcase()
Caps Lock
swapcase
not
lower
inline-if
False
commented
YAML. Simple Dict
isnumeric
strip
dict-comp
keys
if-comprehension
Bird Language
Bird Language
join
if-comprehension
in
and
list-comp
3
Sum by Type - improved
Sum by Type
isinstance
elif
int
str
for
easy
Common Words
sorted
join
in
append
split
2
easy
Follow Instructions
elif
for
if
Not hard
Call to Home
math.ceil
ceil
float
math
append
easiest
Pangram
isalpha
lower
inline-if
False
and
6
Conversion from CamelCase
Conversion from CamelCase
upper
pop
lower
join
elif
Letter Queue - improved
Letter Queue
List
typing.List
pop
typing
join
Secret Message
Secret Message
lower
join
if-comprehension
list-comp
comprehension
Striped Words
Striped Words
isnumeric
upper
isalpha
not
or
Absolute Sorting
Absolute Sorting
tuple
abs
while
False
True
Solution with re.compile()
Bird Language
re.compile
compile
re.sub
sub
r-string
Common Words - improved
Common Words
intersection
set
sorted
join
split
took me longer than it should have
The Most Wanted Letter
isalpha
lower
sorted
elif
and
O'Reilly
Took me a while
Cipher Crossword
copy.copy
numpy.zeros
zeros
itertools.permutations
permutations
3
Flatten a List - greatly improved
Flatten a List
replace
if-comprehension
list-comp
split
comprehension
5
loops, loops, loops
Determine the Order
contextlib.suppress
suppress
contextlib
with
reverse
1
not hard
Sum of Digits
break
sum
while
True
list-comp
4
Compress List - shorter
Compress List
None
append
for
if
Lightbulbs 4 - commented
Multiple Lightbulbs
type
datetime.datetime
values
dict-comp
tuple
1
The Flat Dictionary
The Flat Dictionary
isinstance
dict
items
not
while
How Deep
How Deep
elif
str
for
if
lightbulb 2
Lightbulb Start Watching
continue
None
elif
and
range
First
Chunk
math.floor
floor
math
typing.Iterable
Iterable
Count Inversions
Count Inversions
while
False
True
range
list
3
Median of Three
Median of Three
typing.Iterable
Iterable
typing
sorted
append
Median of Three - improved
Median of Three
sorted
append
range
len
for
Third lightbulb - commented
Lightbulb End Watching
datetime.datetime
datetime
continue
None
or
Compress List
Compress List
typing.Iterable
Iterable
typing
append
list
1
Loading Cargo
Loading Cargo
copy
keys
remove
abs
break
Reverse Every Ascending
Reverse Every Ascending
sorted
append
True
list-comp
range
Time Converter
Time Converter (12h to 24h)
elif
else
int
str
len
minimal
Lightbulb Intro
range
int
len
for
Flatten a List
Flatten a List
reverse
break
while
if-comprehension
append
5
Xs and Os - improved
Xs and Os Referee
List
typing.List
typing
list-comp
range
Incinerator
Not hard
Every Person is Unique
class
reverse
divmod
f-string
date
20
1
The Warlords
The Warlords
class
object
super
pass
remove
The Lancers
The Lancers
class
object
pass
break
max
The Vampires - improved
The Vampires
class
object
pass
remove
continue
Hacker Language
Hacker Language
class
pass
chr
bin
ord
dict comprehension
Voice TV Control
class
type
values
dict-comp
keys
The Weapons
The Weapons
class
object
super
pass
remove
Straight Fight
Straight Fight
class
object
pass
remove
continue
The Defenders - improved
The Defenders
class
object
pass
remove
continue
Solution 1
Geometry Figures
math.tan
tan
class
math.sin
sin
1
Solution 2
Geometry Figures
math.tan
tan
class
math.sin
sin
The Healers
The Healers
class
object
pass
remove
continue
Metaclass
Capital City
class
object
super
type
if
Army Units
Army Units
class
super
f-string
pass
lower
The Lancers - improved
The Lancers
class
object
pass
remove
continue
Microwave Ovens
Microwave Ovens
class
divmod
datetime.timedelta
timedelta
super
Dialogues
Dialogues
class
super
f-string
pass
lower
Nothing special
Party Invitations
class
f-string
remove
None
inline-if
3 Chefs
3 Chefs
class
super
f-string
values
keys
itertools.cycle
Multicolored Lamp
cycle
itertools.cycle
class
next
itertools
copy.copy
Text Editor
copy.copy
class
copy
f-string
join
Building Base
Building Base
class
f-string
set() and frozenset()
Friends
class
discard
frozenset
set-comp
add
The Warriors - improved
The Warriors
class
break
inline-if
while
False
Mine
Fast Train
Fast Train
cumsum
numpy.cumsum
numpy
as
all
1
Currency Style
Currency Style
contextlib.suppress
suppress
contextlib
with
re.search
17
Brute force :)
Bigger Together
itertools.permutations
permutations
itertools
List
typing.List
Recursion, list.copy()
Domino Chain
copy
remove
set
not
inline-if
oneliner
Achilles and the Tortoise
round
First
What Is Wrong With This Family?
remove
or
while
in
elif
Cut Sentence
Cut Sentence
break
list-comp
split
comprehension
else
1
Recursion - improved
Determinant
sum
append
list-comp
range
comprehension
Can Balance
Can Balance
typing.Iterable
Iterable
typing
sum
list-comp
str.translate()
Currency Style
contextlib.suppress
suppress
contextlib
with
translate
Caesar Cipher - encryptor
Caesar Cipher (encryptor)
chr
ord
isalpha
join
elif
oneliner
Best Stock
values
dict
items
max
if-comprehension
Caesar Cipher - decryptor
Caesar Cipher (decryptor)
chr
ord
isalpha
or
join
Binary Count
Binary Count
bin
lambda
count
str
divmod
The Greatest Common Divisor
divmod
min
inline-if
while
False
EZ
Fizz Buzz
elif
and
else
int
str
1
Moore Neighbourhood
Moore Neighbourhood
and
range
len
for
if
1
Ice Base
Counting Tiles
Counting Tiles
numpy.ceil
numpy.sqrt
ceil
numpy
sqrt
4
Oneliner
Monkey Typing
find
set
lower
sum
list-comp
7
Actual oneliner
Monkey Typing
find
lower
lambda
sum
list-comp
1
Long Repeat
Long Repeat
else
int
str
for
if
Fractions makes this easy
Oil Pie
Fraction
fractions.Fraction
fractions
abs
sum
Count Chains
Count Chains
Tuple
typing.Tuple
List
typing.List
abs
functional programming
Identify Block
contextlib.suppress
suppress
contextlib
with
reversed
Largest Rectangle
Largest Rectangle in a Histogram
min
range
len
for
if
Reverse Roman Numerals
Reverse Roman Numerals
keys
pass
continue
break
except
Morse Encoder
Morse Encoder
lower
else
for
if
1
it's an OK solution I guess
Find Quotes
break
while
append
True
range
Clock Angle
Clock Angle
abs
inline-if
int
if
Long Repeat - improved
Long Repeat
else
int
str
for
if
Roman Numerals
Roman Numerals
items
index
break
replace
while
How to Find Friends
How to Find Friends
not
while
if-comprehension
in
elif
Feed Pigeons
Feed Pigeons
break
while
elif
True
if
EZ
The Most Numbers
min
max
list-comp
comprehension
else
2
The Most Numbers - improved
The Most Numbers
min
max
else
len
if
Alice In Wonderland
minimalistic
Zigzag Array
reversed
inline-if
list-comp
range
comprehension
5
double loop
Transposed Matrix
numpy.zeros
zeros
numpy
as
range
12
not pretty but it works
YAML. List and Comments
isnumeric
type
strip
values
dict-comp
12
Greatly improved speed
Digits Doublets
copy
index
break
while
if-comprehension
15
Commented
IP Network: Route Summarization
f-string
all
bin
break
join
collections.defaultdict()
The Fastest Horse
collections.defaultdict
defaultdict
values
keys
collections
commented, improved
Tree Walker
type
values
dict
break
while
Middle Characters
Middle Characters
inline-if
int
len
first attempt, can probably be improved for speed
Digits Doublets
copy
break
while
False
append
datetime, timedelta
When is Friday?
datetime.timedelta
timedelta
date
datetime.date
datetime
Brute force: double loop
Long Non Repeat
join
append
range
else
len
Commented
Multiplication Table
copy.deepcopy
deepcopy
copy
bin
or
GitHub
The Highest Building
The Highest Building
sum
list-comp
range
comprehension
len
1
Expand Intervals
Expand Intervals
break
while
append
True
for
date, timedelta
The Most Frequent Weekdays
datetime.timedelta
timedelta
values
date
datetime.date
.endswith()
The End of Other
endswith
False
and
True
for
Dropbox
should be clear
Common Tail
min
None
break
inline-if
range
URL Normalization
URL Normalization
isalnum
isnumeric
f-string
pass
chr
1
functools.partial()
URL Normalization
functools.partial
partial
isalnum
isnumeric
functools
A few loops
Text Formatting
math.floor
floor
divmod
math
break
Friendly Number - improved
Friendly Number
round
find
abs
inline-if
elif
Simple indeed
Simple Hashlib
bytes
hashlib.sha1
hashlib.sha224
hashlib.sha256
hashlib.sha384
2
Just some math
Humpty Dumpty Form
math.log
log
math.asin
asin
math.pi
Best word
Worth of Words
sum
list-comp
comprehension
for
if
something
The Best Number Ever
Numbers Factory
Numbers Factory
float
round
break
replace
sorted
Palindromic
The Longest Palindromic
except
try
while
False
True
Speech Module
Speech Module
else
int
str
if
PyCon TW
simple
Digit Stack
pop
elif
append
int
for
Ryerson Letter Grade
Ryerson Letter Grade
keys
replace
in
elif
list-comp
Sum Consecutives
Sum Consecutives
append
else
for
if
Random approach
Golden Pyramid
randint
random.randint
random
max
sum
Simple Areas
Simple Areas
math.pi
pi
math.sqrt
sqrt
math
1
functools.reduce()
House Password
isnumeric
functools.reduce
reduce
functools
all
Storage
itertools.combinations()
The Rows of Cakes
combinations
itertools.combinations
itertools
continue
pop
16
Saw the Stick
Saw the Stick
contextlib.suppress
suppress
contextlib
with
IndexError
Group Equal consecutive
Group Equal consecutive
copy
enumerate
not
or
elif
.all()
Skew-symmetric Matrix
numpy.transpose
transpose
numpy.array
array
numpy
Word Pattern
Word Pattern
isnumeric
bin
isalpha
or
False
set.union(), set.intersection()
Moria Doors
array.array
array
union
intersection
values
Weak Point
Weak Point
enumerate
sum
list-comp
range
comprehension
Blizzard
Weekend Counter - improved
Weekend Counter
datetime.timedelta
timedelta
datetime
while
in
19
1
First
String Conversion
max
in
range
len
for
Useless Flights
Useless Flights
set-comp
isinstance
List
typing.List
not
Spaceship Landing Strip
Spaceship Landing Strip
pass
except
try
max
while
While loop
Weekend Counter
datetime.timedelta
timedelta
datetime
break
while
3
Re patterns
Stressful Subject
re.search
search
upper
re
None
The First Working Day
The First Working Day
datetime.timedelta
timedelta
date
datetime.date
format
datetime is useful
Unlucky Days
datetime.datetime
datetime
range
int
for
2
Triangles
The Angles of a Triangle
math.acos
acos
math.pi
pi
round
Rock
My first attempt, does not always pass the random checks
Park Benches
contextlib.suppress
suppress
contextlib
with
Tuple
1
Shelter
just checking the "Decimal" box
The Nearest Square Number
math.trunc
trunc
Decimal
decimal.Decimal
decimal
13
clear
The Nearest Square Number
math.trunc
trunc
math.sqrt
sqrt
math
Escher
Keys and Locks
Keys and Locks
numpy.rot90
rot90
numpy.array
array
numpy
Wild Dogs
Wild Dogs
math.sqrt
sqrt
pass
round
math
The Secret Room
The Secret Room
index
lambda
sorted
elif
list-comp
A bit dense
Treasures
divmod
f-string
keys
items
sort
The Buttons
The Buttons
contextlib.suppress
suppress
contextlib
with
copy.deepcopy
TSR - alternative
The Secret Room
ChainMap
collections.ChainMap
collections
index
lambda
while, while, while
Card Game
dict-comp
keys
any
pop
min
The Stones
The Stones
all
not
if-comprehension
False
and
2
Slightly improved
Treasures
divmod
f-string
keys
items
sort
The Stone Wall
The Stone Wall
if-comprehension
list-comp
split
range
comprehension
Safe Code
Safe Code
contextlib.suppress
suppress
contextlib
with
eval
Ground for the House - improved
Ground for the House
inline-if
if-comprehension
False
True
list-comp
Ground for the House
Ground for the House
all
continue
pop
not
while
1
The Ship Teams
The Ship Teams
keys
or
sorted
if-comprehension
list-comp
nothing special
Compass, Map and Spyglass
enumerate
index
min
abs
in
Not On Map
oneliner
Length of the String
lambda
len
15
1