27
dan_rue
7 24 34
3999/ 4195
Last seen 2 hours ago
Member for 1 year, 6 months, 16 days
Difficulty Normal
Missions (311) / Solutions (104)
Best solutions / Newest solutions
Home
thoughts about this one?
Sun Angle
typing.Union
Union
float
typing
inline-if
2
f string
Date and Time Converter
f-string
inline-if
print
int
str
Electronic Station
__ge__ & __le__
Cipher Dict
hex
iter
next
map
None
1
no initial tabs allowed :D
Cipher Dict (decryption)
bytes
f-string
dict
items
not
10
combinations..
Remove Brackets
combinations
itertools.combinations
reversed
itertools
replace
1
first go.. nothing special
Unix Match. Part 1
re.split
match
re.match
re
replace
just for the stats..
Mathematically Lucky Tickets
cache
functools.cache
operator.truediv
truediv
operator.sub
unnecessary recursion
Brackets
lambda
join
while
if-comprehension
in
with sets
Can You Pass?
set-comp
add
remove
pop
set
Scientific Expedition
non-zip_longest version
Fuzzy String Matching
min
bool
max
range
int
6
Any optimization suggestions?
Water Sort Game
cache
functools.cache
update
copy
decorator
7
Compact, but still readable?
Nonogram Encode
zip
map
max
join
list-comp
my solution (with comments :)
Beat The Previous
while
append
True
list
else
Anyone know how to make this with only one pattern?
Caps Lock
re.sub
sub
upper
re
lambda
2
Love it!
I Love Python!
Clear and short?
Cipher Map
zip
join
if-comprehension
list-comp
range
Is there any reason to use set().intersection() instead of & ?
Common Words
set
sorted
join
split
str
O'Reilly
Recursive solution. Not sure about this one.. Any thoughts?
Flip of Time
combinations
itertools.combinations
is
itertools
tuple
10
Quick 'n dirty
The Final Stone
remove
max
not
inline-if
while
11
1
As simple as I can get it :)
Integer Palindrome
bool
while
append
int
13
2
Slow but golden..
Exploring Wythoff Array
math.floor
floor
math.sqrt
sqrt
tuple
16
ascii_lowercase, ascii_uppercase
Matrix-2-String
Ellipsis
ascii_uppercase
string.ascii_uppercase
ascii_lowercase
string.ascii_lowercase
Really simple :D
String-2-Matrix
Ellipsis
upper
tuple
inline-if
in
'a long and winding road..'
Lightbulb Operating
fromkeys
typing.Union
Union
Optional
typing.Optional
just for stats
Lightbulb Operating
fromkeys
typing.Union
Union
Optional
typing.Optional
2
Non-matrix solution
The Hollow Diamond
chain
itertools.chain
next
ascii_lowercase
string.ascii_lowercase
Just posting this here for the achievments :)
Multiple Lightbulbs
typing.Union
Union
Optional
typing.Optional
iter
clear..
Median of Three
copy
sorted
range
list
int
2
First
The Flat Dictionary
isinstance
dict
items
elif
else
first try..
Reverse Every Ascending
clear
reversed
enumerate
typing.Iterable
Iterable
sets and stuff
Xs and Os Referee
any
zip
set
or
elif
1
As short and simple as I can get it
How Deep
isinstance
tuple
max
lambda
if-comprehension
2
first try, just for laughts
Time Converter (12h to 24h)
zfill
f-string
inline-if
False
and
Any thought on this one?
Loading Cargo
combinations
itertools.combinations
itertools
abs
sum
wanted to use pairwise :D
Count Inversions
itertools.pairwise
pairwise
itertools
tuple
enumerate
Incinerator
just for stats..
Capital City
class
hasattr
super
not
if
propertey!
The Warriors
class
property
super
decorator
bool
still going strong..! :D
The Weapons
class
staticmethod
property
super
reversed
Army_1 for the win!
Straight Fight
class
staticmethod
property
super
reversed
first go.. nothing special
The Vampires
class
staticmethod
property
super
decorator
same fight function for units and armys
The Healers
class
staticmethod
property
super
decorator
just for stats..
Multicolored Lamp
Enum
enum.Enum
enum
class
dataclass
Every Person is Unique
dataclass
dataclasses
dataclasses.dataclass
class
f-string
keeping it simple..
Army Battles
class
property
super
decorator
pop
just for stats..
Friends
class
frozenset
union
add
remove
Mine
nothing special..
Aggregate by Operation
contextlib.suppress
suppress
contextlib
with
ZeroDivisionError
20
just for stats..
Switch Keys to Values
collections.defaultdict
defaultdict
add
dict
items
Translation table solution
Caesar Cipher (encryptor)
translate
dict-comp
ord
set
if-comprehension
1
First
Moore Neighbourhood
sum
if-comprehension
and
list-comp
comprehension
Ice Base
Short, sweet, and dressed with a sprinkle of #comment :D
Clock Angle
map
min
abs
split
int
7
1
short and simple
Cleaning Robot
dict-comp
float
continue
inline-if
range
11
isnumeric()
Is String a Number?
isnumeric
lambda
16
Now that's what I call a clear and easy solution :D
Identify Block
items
tuple
map
min
set
1
with reduce..
Colorful Disks
Ellipsis
reversed
functools.reduce
reduce
functools
fstring & groupby
Count And Say
groupby
itertools.groupby
f-string
itertools
join
regex 'n stuff
Is String a Number? (Part II)
match
re.match
strip
re
None
3
3x or, 3x > and 1x not is enough.. If you need more, you're just showing off!
Interesting, intersecting
tuple
bool
not
or
int
As simple as I can get it :)
When "k" is Enough!
Any
typing.Any
typing.Iterable
Iterable
typing
1liner
Move Zeros
lambda
count
if-comprehension
list-comp
comprehension
Better than the popular solution with 'in'
Correct Capital
istitle
islower
isupper
lambda
or
1
Very clear and easy solution
Reverse Roman Numerals
zip
while
len
for
Just a ugly one liner..
Largest Rectangle in a Histogram
combinations
itertools.combinations
itertools
min
max
Easy to read
How to Find Friends
issubset
any
enumerate
pop
bool
Short and simple solution with itertools
Feed Pigeons
itertools.accumulate
accumulate
itertools.count
itertools
enumerate
1
Alice In Wonderland
Simple solution with some comments :)
Bishop vs Aliens
tuple
break
bool
while
in
14
just for stats..
Tree Walker
AttributeError
raise
type
values
dict
First
When is Friday?
reversed
date
datetime.date
datetime
map
First
The Fastest Horse
index
min
set
max
count
working with sets
The Shortest Knight's Path
set-comp
f-string
chr
add
ord
lambda, map and zip
Transposed Matrix
zip
map
lambda
list
GitHub
gcd
Evenly Spaced Trees
math.gcd
gcd
math
map
min
nevermind me..
Simplify Unix Path
startswith
strip
isalpha
replace
not
with a deque
Open Labyrinth
collections.deque
deque
items
collections
while
Dropbox
My shortest version
Sum of Distinct Cubes
cache
functools.cache
reversed
decorator
functools
2
With a little help from CDG.Axels solution :D
Huffman Encode
fromkeys
dict
lambda
count
or
7
2
Short
The Brick Factory Problem
None
int
if
11
reverse iterate
Revorse the vewels
next
reversed
islower
upper
lower
simple
Sort Sorted Groups
chain
itertools.chain
itertools
pop
not
Regex? What the hell is Regex..?
URL Normalization
case
match-case
ascii_letters
string.ascii_letters
digits
just for stats..
Friendly Number
keys
float
format
dict
break
First
The Longest Palindromic
max
if-comprehension
list-comp
range
comprehension
reduce
Numbers Factory
reversed
functools.reduce
reduce
functools
not
PyCon TW
classic reverse approach
Golden Pyramid
reversed
tuple
enumerate
max
len
bisect!
Ryerson Letter Grade
bisect.bisect
bisect
list-comp
comprehension
int
Storage
Any optimizations in line 13-24?
Playfair Cipher
isalnum
divmod
filter
index
lower
clear
Moria Doors
union
intersection
isalpha
min
set
HubSpot
Nevermind me, just wanted to use zip_longest for once..
The Hamming Distance
itertools.zip_longest
zip_longest
f-string
itertools
sum
Blizzard
one line
Mountain Scape
set-comp
lambda
range
comprehension
len
5
My first try at Kruskal’s algorithm
Connect Stars
issuperset
combinations
itertools.combinations
Tuple
typing.Tuple
Shelter
just for stats..
Halloween Monsters
yield
collections.Counter
Counter
all
items
just for stats..
The Nearest Square Number
round
int
just for stats..
ADFGVX Cipher
collections.fromkeys
cycle
itertools.cycle
OrderedDict
collections.OrderedDict
Codeship
brute force
Unfair Dice
combinations_with_replacement
itertools.combinations_with_replacement
itertools.product
product
as
Escher
Simple solution
The Buttons
remove
pop
sorted
while
if-comprehension
14
7
long but easy to understand
The Tower
continue
enumerate
break
max
or
As simple as it gets (maybe..)
The Stones
any
if-comprehension
True
range
comprehension
Short and clear
Keys and Locks
zip
while
False
and
True
Solution without eval
Safe Code
remove
enumerate
break
replace
if-comprehension
Just for stats..
Compass, Map and Spyglass
values
dict-comp
enumerate
pop
abs
Nevermind me, just wanted to use itemgetter for once..
The Ship Teams
itemgetter
operator.itemgetter
operator
dict
items
As short as I can get it
The Stone Wall
zip
index
max
count
list-comp
list-comprehensions, index() and ValueError
Ground for the House
ValueError
find
zip
index
except
Not On Map
string_length = len
Length of the String
len
1