20
Lemmi
7 20 42
2275/ 2445
Last seen 1 year ago
Member for 6 years, 10 months, 14 days
Difficulty Normal
Missions (138) / Solutions (110)
Best solutions / Newest solutions
Initiation
numpy product
Multiply (Intro)
numpy.product
product
numpy
as
1
6
list of indices
Easy Unpack
tuple
comprehension
5
4
next + enumerate
Beginning Zeros
next
enumerate
if-comprehension
comprehension
int
10
What about an empty string?
Correct Sentence
endswith
upper
not
and
str
12
sum isdigit
Count Digits
map
isdigit
sum
int
str
12
zip(a[::2], a[1::2] + '_')
Split Pairs
zip
map
join
list
math.prod (python 3.8)
Multiply (Intro)
math.prod
prod
math
1
min with key
Nearest Value
min
abs
set
lambda
int
1
next
End Zeros
next
enumerate
if-comprehension
comprehension
int
try_parse
Sum Numbers
ValueError
map
except
try
sum
not any islower
All Upper I
islower
any
not
comprehension
1
one place split
First Word (simplified)
split
str
1
Home
simple but not time efficient
Sort Array by Element Frequency
index
lambda
count
sorted
13
1
Find calculated defenders
Pawn Brotherhood
chr
any
ord
lambda
sum
+ n%2
Split List
list
len
all + [i:i + 3]
Three Words
all
isalpha
False
True
split
any, all, zip
Three Words
all
any
zip
isalpha
split
3
sum Counter
Sort Array by Element Frequency
collections.Counter
Counter
collections
sum
list-comp
Counter 1
Sort Array by Element Frequency
collections.Counter
Counter
collections
list-comp
comprehension
More than just letters
Popular Words
isspace
collections.Counter
Counter
dict-comp
collections
From start to stop
First Word
next
enumerate
isalpha
not
or
Brute-force defenders
Pawn Brotherhood
any
ord
enumerate
abs
set
without count
Non-unique Elements
enumerate
or
if-comprehension
in
list-comp
Electronic Station
reduce by replace
Surjection Strings
functools.reduce
reduce
functools
zip
replace
12
1
operator + dict
Boolean Algebra
le
operator.le
eq
operator.eq
and_
18
Counter
Verify Anagrams
collections.Counter
Counter
collections
replace
lower
reduce + filter + map
Digits Multiplication
functools.reduce
reduce
functools
filter
map
numpy with :=
Digits Multiplication
numpy.product
product
numpy
as
if-comprehension
rfind
Sort by Extension
rsplit
rfind
List
typing.List
typing
recursion
Words Order
add
bool
set
not
or
classic
Brackets
values
keys
pop
not
or
index & zip
Words Order
all
zip
index
bool
inline-if
stack + dict
Brackets
values
keys
pop
or
inline-if
2
Scientific Expedition
np.unique
The Most Wanted Letter
numpy.unique
unique
numpy.array
array
numpy
1
1
PEP 20
I Love Python!
not
inline-if
join
comprehension
8
groupby
Sum by Type
groupby
itertools.groupby
type
dict-comp
get
12
walrus :=
YAML. Simple Dict
dict-comp
isdigit
inline-if
if-comprehension
in
19
reduce
Follow Instructions
functools.reduce
reduce
functools
lambda
list-comp
0 <= i == j -1
Goes Right After
find
bool
str
Map split & reduce by intersection
Common Words
intersection
functools.reduce
reduce
functools
map
Reduce with replace (one-liner)
Bird Language
functools.reduce
reduce
functools
replace
lambda
1
Counter
The Most Wanted Letter
collections.Counter
Counter
keys
collections
isalpha
1
Straight
Cipher Map
reversed
zip
join
if-comprehension
list-comp
Straight
Time Converter (24h to 12h)
format
map
inline-if
split
int
re
Striped Words
punctuation
string.punctuation
re.split
string
all
groupby + min + max
Call to Home
groupby
itertools.groupby
itertools
map
min
Straight ("state machine")
Striped Words
punctuation
string.punctuation
string
upper
or
len of the set
Pangram
set-comp
isalpha
lower
if-comprehension
comprehension
map + min
The Most Wanted Letter
get
items
continue
isalpha
min
O'Reilly
'p' in time
Time Converter (12h to 24h)
format
map
in
split
int
2
1
sum(items) * 2 > len(items)
Majority
bool
sum
list
len
6
numpy.partition
Median
numpy.partition
partition
numpy
as
inline-if
Recursion with prefix
The Flat Dictionary
update
isinstance
dict
items
bool
Counter + sum
Frequency Sorting
collections.Counter
Counter
collections
sum
sorted
yield + groupby
Compress List
groupby
itertools.groupby
yield
itertools
typing.Iterable
None in a slice
Remove All After
index
typing.Iterable
None
Iterable
typing
yield
Chunk
yield
typing.Iterable
Iterable
typing
range
Rotation for columns and boring diagonals
Xs and Os Referee
all
zip
join
in
list-comp
iter, next, yield
Sort Except Zero
iter
next
yield
typing.Iterable
Iterable
any + all
Xs and Os Referee
all
any
in
list-comp
range
Mine
With max
Cut Sentence
isalpha
max
inline-if
if-comprehension
list-comp
3
number &= number - 1
Binary Count
while
6
'42' -> '424242...'
Bigger Together
reversed
map
bool
max
lambda
6
2
'42' -> '424242...' ( * 2)
Bigger Together
reversed
map
sort
bool
max
7
Translate
Caesar Cipher (encryptor)
translate
ascii_lowercase
string.ascii_lowercase
as
string
has n − 1 edges and is connected
What Is Wrong With This Family?
setdefault
get
add
zip
map
max, key=get
Best Stock
get
max
chr-ord
Caesar Cipher (decryptor)
isspace
chr
ord
isalpha
or
Counter (most_common)
Best Stock
collections.Counter
Counter
collections
Ice Base
dynamics
Largest Rectangle in a Histogram
is
None
or
elif
and
7
5**((i + 1)//2) * 2**(i//2)
Reverse Roman Numerals
zip
index
inline-if
sum
list-comp
12
Straight O(N)
Long Repeat
else
for
if
2
dfs
How to Find Friends
setdefault
dict-comp
keys
not
False
yield
Find Quotes
clear
yield
not
join
elif
yield from
Find Quotes
yield
find
in
if
1
threes by twos
Roman Numerals
join
and
range
str
len
sum + in
Monkey Typing
lower
sum
if-comprehension
in
comprehension
Alice In Wonderland
First
Long Non Repeat
add
enumerate
set
not
or
GitHub
Lefts and rights separately
Create Intervals
zip
sorted
if-comprehension
list-comp
list
1
11
Reduce: append new or update the last
Merge Intervals
functools.reduce
reduce
functools
max
not
1
2
to gather together
Create Intervals
zip
sorted
if-comprehension
list-comp
comprehension
2
Recursion
Merge Intervals
max
len
if
2
zip, sorted, [-1, 1] One-liner
Create Intervals
zip
sorted
if-comprehension
list-comp
list
3
2
next
The Highest Building
next
any
enumerate
index
if-comprehension
10
Straight
Merge Intervals
max
not
or
append
else
1
The power of excluded
Create Intervals
min
max
inline-if
if-comprehension
list-comp
2
Dijkstra adjacency list
The Cheapest Flight
collections.defaultdict
defaultdict
is
add
dict
Dropbox
Nearest base power + format
Friendly Number
format
round
abs
inline-if
while
getitem
Worth of Words
map
max
lambda
sum
PyCon TW
binary search
Ryerson Letter Grade
itertools.product
product
itertools
list-comp
comprehension
4
2
dfs_count
Calculate Islands
not
or
sorted
if-comprehension
False
Any
House Password
islower
any
isupper
isdigit
comprehension
Storage
Reduce for flattening
Skew-symmetric Matrix
operator.add
operator
functools.reduce
reduce
functools
HubSpot
XOR + another counting
The Hamming Distance
bin
map
sum
int
dfs (adjacency list)
New Cities
collections.defaultdict
defaultdict
add
collections
set
dfs (adjacency list)
Node Disconnected Users
collections.defaultdict
defaultdict
keys
add
collections
len
Restricted Sum
filter
map
lambda
join
len
1
manually
Number Base
reversed
chr
ord
index
join
Blizzard
Reduce
Min and Max
gt
operator.gt
lt
operator.lt
operator
19
(groupby + itemgetter) and any
Stressful Subject
itemgetter
operator.itemgetter
groupby
itertools.groupby
operator
Cosine theorem + α, β
The Angles of a Triangle
math.degrees
degrees
math.acos
acos
round
Area (Geron's formula + sinuses)
The Angles of a Triangle
math.asin
asin
math.degrees
degrees
math.sqrt
datetime
Unlucky Days
date
datetime.date
datetime
sum
if-comprehension
Straight
Min and Max
gt
operator.gt
lt
operator.lt
operator
Codeship
Scalable
The Square Chest
all
min
max
list-comp
range
7
defaultdict (modeling)
Pearls in the Box
collections.defaultdict
defaultdict
f-string
values
float
modeling with list of ints
Pearls in the Box
float
round
count
sum
print
Watchtower
min-max
Funny Addition
min
max
1
eval
Funny Addition
eval
map
join
str
3
Not On Map
Counters sum
Aggregate and Count
collections.Counter
Counter
dict
collections
map