29
lxf42
8 30 49
4299/ 4695
Last seen 3 months ago
Member for 2 years, 3 months, 6 days
Difficulty Normal
Missions (284) / Solutions (223)
Best solutions / Newest solutions
Initiation
with a dict
Nearest Value
dict-comp
min
abs
set
if-comprehension
3
First
All the Same
Any
typing.Any
List
typing.List
bool
15
First
End Zeros
re.search
search
r-string
re
int
1
sum & isdigit
Count Digits
isdigit
sum
comprehension
int
str
First
All Upper I
upper
bool
str
1
First
Max Digit
max
comprehension
int
str
1
First
Between Markers (simplified)
index
str
2
First
Replace First
typing.Iterable
Iterable
typing
list
1
Home
count with loop
Popular Words
dict-comp
dict
lower
in
split
12
1
format with datetime
Date and Time Converter
datetime.datetime
datetime
replace
str
if
17
1
summing bools
Pawn Brotherhood
chr
ord
set
or
sum
1
yields
Duplicate Zeros
yield
typing.Iterable
Iterable
not
typing
Just iterating over the list
Changing direction
pass
max
elif
and
list
sets
Missing Number
pop
min
set
sorted
range
First
First Word
re.compile
compile
findall
re.findall
r-string
TRYing
Between Markers
index
except
try
str
len
First
Bigger Price
lambda
sorted
True
list
int
First
Three Words
isdigit
bool
join
in
list-comp
Electronic Station
build up dict with valid entries
Surjection Strings
in
False
True
range
else
7
calculate sides lengths and scale 2nd triangle
Similar Triangles
numpy.sqrt
numpy.array
array
numpy
Tuple
9
First
Can You Pass?
pass
add
IndexError
pop
except
1
super easy with sympy
Inside Block
Point2D
sympy.Point2D
sympy.Polygon
Polygon
sympy
sorting with regex
Sort by Extension
match
re.match
r-string
List
typing.List
one more len
Acceptable Password IV
digits
string.digits
intersection
string
set
sets
Acceptable Password VI
digits
string.digits
intersection
string
set
1
sets
Acceptable Password III
digits
string.digits
intersection
string
set
1
removing
Verify Anagrams
ValueError
remove
replace
except
try
sets
Acceptable Password II
digits
string.digits
intersection
string
set
check alphabet chars with set
All Upper II
ascii_uppercase
string.ascii_uppercase
intersection
string
upper
1
set and sorted
Ascending List
typing.Iterable
Iterable
bool
set
typing
1
good task for re
Brackets
re.subn
subn
re.sub
sub
r-string
2
no password
Acceptable Password V
digits
string.digits
intersection
string
set
reducing digits
Digits Multiplication
functools.reduce
reduce
functools
lambda
if-comprehension
Scientific Expedition
numpy
Follow Instructions
numpy.array
array
numpy
Tuple
typing.Tuple
10
search in lines, then in columns
The Hidden Word
splitlines
IndexError
index
None
replace
12
1
checking different possibilities
YAML. More Types
startswith
strip
None
replace
isdigit
19
could it be max?
Latest ISO datetime
max
defaultdict
Convert and Aggregate
collections.defaultdict
defaultdict
filter
dict
items
with exception handling
Goes Right After
index
bool
except
try
False
1
re
Conversion from CamelCase
re.sub
sub
r-string
re
lower
1
set intersection
Pangram
intersection
ascii_lowercase
string.ascii_lowercase
string
set
1
split and isdigit
YAML. Simple Dict
isdigit
split
int
for
if
re
Conversion into CamelCase
re.sub
sub
r-string
upper
re
build dict, then calculate total
Call to Home
math.ceil
ceil
values
get
List
morse or binary?
Morse Clock
translate
re.sub
sub
r-string
format
char by char
Caps Lock
upper
not
elif
False
else
isinstance
Sum by Type
Tuple
typing.Tuple
isinstance
typing
sum
1, 2 or 3
Bird Language
ascii_lowercase
string.ascii_lowercase
string
while
if-comprehension
simple
Time Converter (24h to 12h)
f-string
elif
split
else
int
split and match
Letter Queue
case
match-case
List
typing.List
pop
string, split and enumerate
Striped Words
string.whitespace
whitespace
punctuation
string.punctuation
re.split
sets
Common Words
intersection
set
sorted
join
split
using string
Secret Message
ascii_uppercase
string.ascii_uppercase
string
join
if-comprehension
Counter
The Most Wanted Letter
ascii_lowercase
string.ascii_lowercase
filter
collections.Counter
Counter
O'Reilly
easy with numpy
Median of Three
numpy.median
median
numpy
as
typing.Iterable
2
int str
Integer Palindrome
lambda
int
str
4
2
Easy
Replace Last
list
4
summed
Lightbulb Intro
datetime.datetime
datetime
List
typing.List
typing
11
with generator expression
Chunk
typing.Iterable
Iterable
typing
range
list
summing bools
Majority
bool
sum
list
len
let's evaluate some string
Flatten a List
translate
eval
str
Recursive
How Deep
type
max
list-comp
comprehension
int
1
zip_longest
Lightbulb End Watching
itertools.zip_longest
zip_longest
Optional
typing.Optional
datetime.datetime
sorted
Frequency Sorting
List
typing.List
typing
lambda
count
only 8 possibilities
Xs and Os Referee
copy
extend
List
typing.List
typing
heapq
The Final Stone
heapq.nlargest
nlargest
heapify
heapq.heapify
heappush
simple for with conditionals
Lightbulb Start Watching
Optional
typing.Optional
datetime.datetime
datetime
List
Simple
Reverse Every Ascending
insert
break
range
else
len
First
Compress List
typing.Iterable
Iterable
typing
append
list
recursive and loops
The Flat Dictionary
type
f-string
dict
items
elif
First
Remove All After
index
typing.Iterable
Iterable
typing
inline-if
record positions, remove the 0s, sort, put them back
Sort Except Zero
insert
remove
sort
index
typing.Iterable
Easy
Index Power
inline-if
list
int
len
reduced combinations
Count Inversions
combinations
itertools.combinations
functools.reduce
reduce
functools
First
Loading Cargo
functools.lru_cache
lru_cache
copy
decorator
functools
Incinerator
First
Geometry Figures
class
math.sqrt
sqrt
float
round
3
First
The Weapons
dataclasses.field
field
dataclass
dataclasses
dataclasses.dataclass
abstract army, and nested localized soldiers
Army Units
ABC
abc.ABC
abc.abstractmethod
abstractmethod
abc
read method half of the code ...
Hacker Language
case
match-case
class
ascii_letters
string.ascii_letters
First time to use __new__
Capital City
class
super
None
not
if
First
Straight Fight
class
hasattr
property
super
yield
First
Microwave Ovens
class
divmod
super
pass
format
with Lancers
The Lancers
class
property
super
decorator
None
Now with healers
The Healers
class
hasattr
property
super
decorator
used hash for the channels
Voice TV Control
class
values
dict-comp
keys
enumerate
First
3 Chefs
ABC
abc.ABC
abc
class
f-string
First
Every Person is Unique
case
match-case
class
f-string
date
First
The Vampires
class
super
None
max
inline-if
First
The Defenders
class
None
max
inline-if
while
First
Dialogues
dataclass
dataclasses
dataclasses.dataclass
class
f-string
dataclass
Party Invitations
dataclass
dataclasses
dataclasses.dataclass
AttributeError
class
First
Army Battles
class
None
inline-if
while
False
First
Text Editor
class
f-string
keys
None
max
pretty straightforward
Multicolored Lamp
class
len
1
simple
The Warriors
class
while
False
and
True
Mine
feels a little like cheating, so easy
Determinant
numpy.linalg
linalg
numpy
round
lambda
15
1
First
Aggregate by Operation
case
match-case
collections.defaultdict
defaultdict
filter
16
1
First
Long Pressed
StopIteration
iter
next
pass
IndexError
Fizz Buzz
Fizz Buzz
not
int
str
for
if
2
re with (.)\1
Adjacent Letters
re.subn
subn
r-string
re
while
with enumerate
Can Balance
functools.reduce
reduce
functools
enumerate
typing.Iterable
defaultdict
Switch Keys to Values
collections.defaultdict
defaultdict
add
dict
items
1
First
Caesar Cipher (decryptor)
ascii_lowercase
string.ascii_lowercase
chr
string
ord
Second - 1 liner with 2 lists
Fizz Buzz
index
lambda
list-comp
comprehension
str
not proud of this code
Currency Style
finditer
re.finditer
punctuation
string.punctuation
translate
short
Best Stock
dict
max
lambda
str
2
C...
Cut Sentence
rindex
inline-if
in
int
str
using f-string
Binary Count
f-string
count
int
First
Achilles and the Tortoise
math.gcd
The Greatest Common Divisor
math.gcd
gcd
math
First
Caesar Cipher (encryptor)
chr
ord
inline-if
join
comprehension
with suppress
Moore Neighbourhood
contextlib.suppress
suppress
contextlib
with
IndexError
Ice Base
capitalize, upper, lower
Correct Capital
capitalize
upper
lower
lambda
in
1
using sympy
Count Chains
sympy.Circle
Circle
sympy
Tuple
typing.Tuple
2
one-liner
Interesting, intersecting
lambda
or
and
2
numpy
Not in Order
numpy.array
array
numpy
as
lambda
2
Lambda
Move Zeros
lambda
count
if-comprehension
list-comp
comprehension
10
First
One Switch Strings
zip
bool
set
or
if-comprehension
re
Long Repeat
findall
re.findall
r-string
re
max
re.search and re.match
Is String a Number? (Part II)
match
re.match
re.search
search
r-string
sum with generator
Monkey Typing
set
lower
sum
in
comprehension
1
isnumeric
Is String a Number?
isnumeric
str
generator with defaultdict
When "k" is Enough!
collections.defaultdict
defaultdict
yield
collections
typing.Iterable
generator
Feed Pigeons
yield
max
while
True
for
simple for loop
Morse Encoder
lower
in
elif
for
if
kinda slow (not surprised about it)
Largest Rectangle in a Histogram
break
max
range
comprehension
else
with fractions
Oil Pie
Fraction
fractions.Fraction
fractions
abs
sum
divmod and match-case
Roman Numerals
case
match-case
divmod
while
1
easy with re
Find Quotes
findall
re.findall
r-string
re
1
with Enum
Reverse Roman Numerals
Enum
enum.Enum
enum
class
else
1
First
How to Find Friends
setdefault
union
set
in
append
max min
The Most Numbers
min
max
inline-if
1
Alice In Wonderland
nobrainer with weekday from datetime
When is Friday?
date
datetime.date
datetime
list-comp
split
12
numpy of course
Transposed Matrix
numpy.array
array
numpy
as
13
so much going on
IP Network: Route Summarization
iter
f-string
format
zip
map
one liner
Middle Characters
lambda
len
list comprehension with sorted
Zigzag Array
List
typing.List
typing
sorted
list-comp
Recursive
Swap Nodes
len
if
First
Long Non Repeat
set
not
range
len
for
First
The Fastest Horse
index
min
max
count
list-comp
2
GitHub
short
Expand Intervals
typing.Iterable
Iterable
typing
sum
list-comp
4
1
multiple re.subn
Simplify Unix Path
re.subn
subn
r-string
re
while
5
using sympy
Shooting Range
sympy.Ray
Ray
sympy.Segment
Segment
sympy.Point
First
Barcode Reader
KeyError
startswith
endswith
enumerate
None
First
Solution for Anything
class
lambda
True
First
The Cheapest Flight
List
typing.List
pop
typing
inline-if
using re
Cookies
findall
re.findall
f-string
re
any endswith
The End of Other
endswith
any
if-comprehension
list-comp
comprehension
First
Create Intervals
pass
IndexError
pop
except
try
formatting with datetime
The Most Frequent Weekdays
date
datetime.date
datetime
else
if
Search all paths
Open Labyrinth
List
typing.List
pop
typing
while
Dropbox
max, lambda and sum
Worth of Words
max
lambda
sum
comprehension
4
strings and chain
Atbash Cipher
chain
itertools.chain
ascii_uppercase
string.ascii_uppercase
reversed
13
generator for splitting
Sort Sorted Groups
case
match-case
yield
sum
sorted
18
First
Text Formatting
fill
textwrap.fill
textwrap.wrap
wrap
textwrap
19
1
First
Scytale Encryption
Optional
typing.Optional
chain
itertools.chain
itertools
First
Rotating Grille Cipher
Optional
typing.Optional
List
typing.List
zip
First
Common Tail
zip
None
break
list
int
First
Place Queens
ReferenceError
chain
itertools.chain
raise
itertools.product
with sympy - with some ugly code to adapt the equation
Three Points Circle
sympy.sqrt
sympy.Circle
Circle
sympy.Point
Point
hashlib
Simple Hashlib
hashlib.new
new
hashlib
with some math
Humpty Dumpty Form
math.atanh
atanh
math.asin
asin
math.pi
double loop
The Longest Palindromic
while
len
if
find primes with division by zero
Numbers Factory
ZeroDivisionError
break
except
try
sorted
lot's of tests
Speech Module
case
match-case
strip
if
PyCon TW
First
Sum Consecutives
append
else
len
for
if
parsing TABLE as given
Ryerson Letter Grade
splitlines
split
comprehension
int
str
First
Robot Sort
rstrip
f-string
index
max
while
matching
Digit Stack
case
match-case
pop
append
split
2
re.findall
Double Substring
findall
re.findall
r-string
re
max
straightforward implementation of formulas
Simple Areas
math.pi
pi
math.sqrt
sqrt
math
2
sets
House Password
digits
string.digits
ascii_uppercase
string.ascii_uppercase
ascii_lowercase
Storage
using all
Word Pattern
f-string
all
isalpha
isdigit
max
boring solution
Group Equal consecutive
not
append
else
for
if
numpy
Skew-symmetric Matrix
numpy.array
array
numpy
as
all
not the quickest
Saw the Stick
break
sum
elif
append
list-comp
sums
Weak Point
zip
index
min
sum
list-comp
HubSpot
date and timedelta
Weekly Calendar
datetime.timedelta
timedelta
date
datetime.date
datetime
7
1
date and timedelta
Next Birthday
Dict
typing.Dict
Tuple
typing.Tuple
date
using decimal to get more precision
Repeating Decimals
decimal.getcontext
getcontext
Decimal
decimal.Decimal
decimal
one liner
Non Empty Lines
strip
lambda
sum
split
comprehension
with map and nonlocal
Restricted Sum
add
map
list
First
The Hamming Distance
bin
count
First
Number Base
ValueError
except
try
int
str
Blizzard
First
Unlucky Days
date
datetime.date
datetime
lambda
sum
4
1
reuse of cheapest flights
Useless Flights
List
typing.List
pop
typing
inline-if
14
First
Reversed Permutation Index
math.factorial
factorial
copy
math
pop
datetime
The First Working Day
datetime.strptime
strptime
datetime.timedelta
timedelta
datetime.datetime
Recursive
Permutation Index
math.factorial
factorial
Tuple
typing.Tuple
math
9 or 1 line
Rectangles Union
update
Tuple
typing.Tuple
set-comp
List
First
Stair Steps
max
range
len
for
loop
Weekend Counter
Ellipsis
datetime.timedelta
timedelta
datetime
while
Rock
First
Web Log Sessions
splitlines
match
re.match
datetime.datetime
r-string
Shelter
slicing and comparing with numpy
Pattern Recognition
numpy.array
array
numpy
as
all
20
round sqrt
The Nearest Square Number
math.sqrt
sqrt
round
math
1
try except else
Halloween Monsters
ValueError
pass
remove
except
try
First
One line Drawing
collections.defaultdict
defaultdict
copy
values
collections
Recursive
Completely Empty
TypeError
iter
all
except
try
Cached
Ghosts Age
cache
functools.cache
decorator
functools
keys
Codeship
re.subn - mark liberties with lowercase
Eaten Go Stones
re.subn
subn
r-string
zip
re
2
build up
Ugly Numbers
update
set
not
sorted
while
5
defaultdict
Probably Dice
collections.defaultdict
defaultdict
dict-comp
collections
lambda
Hermit
maxed comprehensions
Stock Profit
max
print
list-comp
range
list
2
recursive one-liner
Shorter Set
min
max
lambda
inline-if
and
re
Backspace Apply
re.subn
subn
r-string
re
while
one-liner
Excel Column Number
ord
enumerate
lambda
sum
comprehension
set and re.split
Unique Email Addresses
re.split
r-string
add
re
replace
First
Network Loops
collections.defaultdict
defaultdict
add
collections
pop
First
Fractions Addition
Fraction
fractions.Fraction
fractions
f-string
sum
First
The Good Radix
ValueError
pass
except
try
range
Escher
sympy
Wild Dogs
sympy.Line
Line
sympy.Point
Point
sympy
First
The Stone Wall
strip
zip
enumerate
max
lambda
rfind and find
Ground for the House
operator.or_
or_
splitlines
rfind
operator
First
The Stones
any
inline-if
if-comprehension
False
True
First
Treasures
f-string
keys
min
print
sorted
First
Keys and Locks
splitlines
strip
remove
zip
not
First
The Secret Room
functools.lru_cache
lru_cache
raise
divmod
decorator
sorted(filter
The Ship Teams
filter
lambda
or
sorted
Not On Map
some counting with ascii_lowercase
Most Wanted Letter
ascii_lowercase
string.ascii_lowercase
values
dict-comp
string
does somebody have a different solution?
Length of the String
int
str
len