38
StefanPochmann
16 38 54 Leader of the month
8978/ 9195
Last seen 2 hours ago
Member for 9 years, 1 month, 4 days
Difficulty Normal
Recent solutions I'm happy with (just starting/trying this): [Words Order](https://py.checkio.org/mission/words-order/publications/StefanPochmann/python-3/short-dict-subsequence/share/5bbb2df54ec5a810d36d7f70ae7e92da/) Dang it no markdown here?

Missions (241) / Solutions (202)
Best solutions / Newest solutions
Initiation
chain + islice
Replace First
islice
itertools.islice
chain
itertools.chain
iter
Freak: fast iterator
Replace First
iter
break
append
for
O(1) space generator
Replace First
iter
yield
for
11
False == 0
Remove All Before
index
in
and
Making Python do it
Easy Unpack
Home
The BEST number
Changing direction
float
or
for
if
3
2
len(items[::2])
Split List
len
Overkill - plugging itertools/map together
Second Index
itertools.tee
tee
contextlib.suppress
suppress
contextlib
4
Counter elements
Sort Array by Element Frequency
collections.Counter
Counter
dict
collections
3
foo
Popular Words
dict
zip
map
lower
count
2
3
Regex
Morse Decoder
capitalize
re.sub
sub
re
lambda
2
6
encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and encode and ...
Morse Decoder
startswith
capitalize
get
upper
map
5
← Prev
Date and Time Converter
datetime.strptime
strptime
f-string
datetime.datetime
datetime
Short
Bigger Price
lambda
sorted
5
2
golfing
Second Index
rfind
None
lambda
count
1
try second parameter of index()
Second Index
pass
index
except
try
str
text.find or None
Between Markers
find
None
inline-if
in
str
1
51
regex
First Word
re.search
search
re
str
1
Electronic Station
1 line: map {}.setdefault
Surjection Strings
setdefault
map
bool
join
str
1
Short: dict subsequence
Words Order
fromkeys
iter
all
in
split
without sorting...
Cipher Dict (decryption)
bytes
f-string
append
for
9
2
Strictly speaking...
Cipher Dict (decryption)
not
sorted
False
append
for
8
1
Directions, please
Cipher Dict (decryption)
bytes
f-string
not
sorted
False
7
Directions, please
Cipher Dict
hex
iter
next
map
append
1
Simple and Short
Can You Pass?
enumerate
abs
if-comprehension
in
and
4
7
78
Verify Anagrams
set-comp
strip
lower
lambda
sorted
3
7
Short recursive (46, can be 42)
Digits Multiplication
lambda
12
Short Regex
Find Sequence
ljust
re.search
search
r-string
any
5
13
Regex One-Liner
Brackets
re.sub
sub
r-string
re
not
2
1
Scientific Expedition
List comprehension
Beat The Previous
map
if-comprehension
list-comp
list
comprehension
15
3
Use your imagination
Follow Instructions
find
sum
comprehension
7
2
Something from Nothing
Conversion from CamelCase
re.sub
sub
re
lower
3
4
First
Conversion into CamelCase
title
replace
2
First
Follow Instructions
count
vek
Bird Language
re.sub
sub
r-string
re
2
13
j.. j.. j.. join!!!
Cipher Map
zip
map
join
if-comprehension
range
1
6
125
Call to Home
max
int
for
if
4
7
64
Pangram
chr
upper
lambda
17
1
Doc Abuse
Pangram
filter
islower
set
lower
lambda
1
Short reduce (62)
Letter Queue
functools.reduce
reduce
functools
lambda
Keep it simple
Striped Words
upper
isalpha
isdigit
inline-if
sum
5
5
Not a writer...
I Love Python!
14
2 short versions
The Hidden Word
find
map
enumerate
replace
max
2
WET makes CLEAR
The Hidden Word
itertools.zip_longest
zip_longest
splitlines
itertools
find
1
Shortest :-p
The Most Wanted Letter
max
lower
lambda
count
6
O'Reilly
± timestamp
Lightbulb Intro
enumerate
sum
comprehension
O(1) space generator
Replace Last
iter
yield
for
Simpler Elephant
Remove All After
pop
index
append
2
Elephant in Cairo - Fast all-rounder - With benchmarks
Remove All After
index
not
if
2
First
Determine the Order
strip
all
lstrip
break
sorted
129
Matrix-2-String
chr
enumerate
sum
join
if-comprehension
2
bregex
Compress List
S
re.S
bytes
re.sub
sub
13
2 short lines
Sort Except Zero
next
filter
None
sorted
and
First
Frequency Sorting
count
sorted
True
18
Accumulate Permutations
Loading Cargo
min
abs
sum
comprehension
17
1
Recursive Balance (73)
Loading Cargo
min
abs
lambda
inline-if
comprehension
16
1
Product with Zero
Loading Cargo
zip
min
abs
lambda
sum
15
< veky
Xs and Os Referee
max
lambda
join
if-comprehension
range
18
1
Mine
Functional
Longest Common Prefix
itertools.accumulate
accumulate
startswith
filter
itertools
mildm + min + max
Longest Common Prefix
startswith
min
max
not
while
1
First
Longest Common Prefix
itertools.accumulate
accumulate
intersection
itertools
map
EAFP: Easier to Ask For Pattern
Collatz Ztalloc
type
is
inline-if
while
and
1
19
Top-down
Postfix Evaluation
next
type
reversed
is
index
2
1
Forgive me, for I have sinned
Postfix Evaluation
eval
type
f-string
pop
except
Simple simulation
Toothpicks
set-comp
collections.Counter
Counter
items
collections
3
Complex nails
Ulam-Warburton Automaton Hex
set-comp
collections.Counter
Counter
collections
if-comprehension
2
8
9-liner: easily up to 10**10000
Ulam–Warburton Automaton
while
int
1
1
Simple simulation
Ulam–Warburton Automaton
set-comp
collections.Counter
Counter
collections
if-comprehension
1
2
obviously
Best Stock
get
max
Fraction
Bigger Together
Fraction
fractions.Fraction
fractions
map
lambda
1
Repeeeaaat
Bigger Together
map
lambda
sorted
join
int
4
4
rfind variations...
Cut Sentence
rfind
inline-if
len
if
15
whatever
Cut Sentence
rfind
max
len
if
19
14
Can't be bothered...
Currency Style
re.sub
sub
r-string
re
replace
2
2
Actual chase, not cheating like everyone else!
Achilles and the Tortoise
range
for
4
7
2D Recursion (96)
Determinant
pop
lambda
or
list-comp
comprehension
2
1
Cookie Recipe
Determinant
lambda
sum
range
list
comprehension
15
Shortest? 52 - Kill me now
Fizz Buzz
repr
lambda
3
16
min :-D
The Greatest Common Divisor
set-comp
min
or
while
comprehension
1
13
Ice Base
Unicode-Find algorithm
Count Chains
chr
map
enumerate
replace
set
17
Second
The Centrifuge Problem
sympy.primefactors
primefactors
sympy
False
and
5
1
Trial of the centurifuge
The Centrifuge Problem
all
not
False
and
True
2
It's a sign
Reveal the Number
eval
float
None
isdigit
not
9
1
First
Morse Encoder
get
upper
map
join
4 problems 1 solution
Long Repeat
set
not
lambda
count
or
3
2
code reuse ftw
Reverse Roman Numerals
zip
map
index
split
range
9
two one-liners
Reverse Roman Numerals
enumerate
count
or
sum
in
3
11
Short O(n)
Counting Tiles
map
max
sum
list-comp
range
2
short and clear
Roman Numerals
zip
split
for
1
61
Bellman–Ford-ish (short)
How to Find Friends
set
in
split
for
if
2
15
Story Time
How to Find Friends
setdefault
inline-if
split
for
if
18
3
sum map __contains__
Monkey Typing
map
lower
lambda
sum
3
2
Alice In Wonderland
Calculate distances
Bishop vs Aliens
math.gcd
gcd
pow
float
tuple
1
First
Bishop vs Aliens
tuple
break
bool
not
in
10
No initial flattening
15-puzzle Solvability
bisect.insort
insort
bisect
enumerate
index
1
1
1 line
15-puzzle Solvability
remove
index
lambda
sum
range
1
1
Short
15-puzzle Solvability
remove
index
bool
not
sum
10
1
4 problems 1 solution
Long Non Repeat
set
not
lambda
count
or
1
2D Recursion
Multiplication Table
lambda
and
15
1
Shorter than htamas'
Multiplication Table
bin
lambda
len
3
1
modified ale1ster
Digits Doublets
zip
sum
if-comprehension
list-comp
comprehension
5
3
GitHub
Second
Exploring Calkin-Wilf Tree
if
3
First
Exploring Calkin-Wilf Tree
len
for
if
10
Next →
The Highest Building
any
map
index
sum
2
8
4 problems 1 solution
Long Repeat Inside
set
not
lambda
count
or
10
First
Simplify Unix Path
startswith
or
join
and
append
1
4
code reuse reuse
Merge Intervals
next
set-comp
zip
pop
max
4
4
punchline
Create Intervals
tuple
zip
map
max
not
3
Another simple oneliner
Create Intervals
zip
sorted
if-comprehension
list
comprehension
2
8
simple oneliner, should be O(n) (see comments)
Create Intervals
itertools.count
next
itertools
count
sorted
2
[old] oneliner, should be O(n)
Create Intervals
itertools.count
next
itertools
count
sorted
10
3
Small
Merge Intervals
max
not
or
for
if
5
2
Lists are easier to update
Merge Intervals
tuple
map
max
not
or
2
3
simple
Merge Intervals
max
not
or
append
for
1
4
bit brute
Painting Wall
set-comp
any
zip
sum
sorted
14
veky + DiZ + Stefan
Solution for Anything
dir
id
type
dict-comp
comprehension
2
16
Meh
Solution for Anything
class
lambda
True
4
XOR
The End of Other
endswith
any
lambda
comprehension
11
7
Shortest? (54)
The End of Other
endswith
any
tuple
lambda
comprehension
2
22
Store paths **in matrix**
Open Labyrinth
zip
for
if
3
1
Dropbox
Reduction
The Brick Factory Problem
is
None
int
if
10
Fixed?
Frogs Collision
operator.sub
operator
sub
map
or
1
7
Secomplex
Frogs Collision
operator.sub
complex
operator
sub
round
13
2
2.7 times faster than built-in max
Maximum Among Three
inline-if
4
1
Findt
Frogs Collision
operator.sub
operator
sub
map
or
3
4
The Equalizer
Common Tail
pop
max
while
len
if
5 versions
Sort Sorted Groups
is
sort
None
not
or
1
Regex
Revorse the vewels
re.sub
sub
findall
re.findall
islower
Less meh
Revorse the vewels
upper
pop
lower
inline-if
join
Brute Force 2
e+pi
OverflowError
itertools.permutations
permutations
eval
itertools.product
3
Brute Force
e+pi
OverflowError
eval
itertools.product
product
float
1
2
swapcase
Atbash Cipher
methodcaller
operator.methodcaller
swapcase
ascii_letters
string.ascii_letters
1
1
Fake Newb!
The Best Number Ever
while
in
range
6
Meh
URL Normalization
match
re.match
re.sub
sub
chr
2
Permutations (6 lines)
Place Queens
set-comp
ord
zip
set
and
2
1
I'm sure you'll agree
The Best Number Ever
lambda
split
int
5
11
Short(90): Recursive
Numbers Factory
repr
lambda
inline-if
and
int
Short(77): eval('*'.join(str(i)))
Numbers Factory
eval
next
lambda
join
if-comprehension
2
1
Simulated Annealing
Three Points Circle
random.random
random
rstrip
float
format
7
amidoinitrite
The Best Number Ever
float
lambda
12
PyCon TW
4 problems 1 solution
Double Substring
set
not
lambda
count
or
2
9
regex oneliner
Double Substring
findall
re.findall
r-string
map
re
1
9
50 (based on przemyslaw.daniel's 62 and artakase's 59)
House Password
set-comp
ord
lambda
comprehension
len
9
8
112
Digit Stack
lambda
inline-if
sum
int
len
7
1
Math + 88
Simple Areas
lambda
or
3
1
Short fast non-recursive lambda
Golden Pyramid
reversed
zip
max
lambda
list-comp
2
1
Short, fast, recursive
Golden Pyramid
zip
max
lambda
list-comp
comprehension
3
Shortest?
Golden Pyramid
max
lambda
len
2
1
61 (was: "Shortest?")
House Password
upper
isalpha
lower
lambda
len
5
3
Storage
There is one obvious way to do it. Even when you're not Dutch.
List Beautify
f-string
zip
max
join
list-comp
Short
Mind Switcher
popitem
get
pop
while
for
1
21
HubSpot
Mathematical
Restricted Sum
sum
6
82
Auto Painting
repr
min
lambda
9
1
YELLING IS GOOD
Restricted Sum
exec
lower
Blizzard
64, using reduce
Stair Steps
functools.reduce
reduce
functools
max
lambda
4
2
Recursive Cycle, Short
The Angles of a Triangle
round
lambda
sorted
and
2
meh
Palindromic Palindrome
lambda
Short, Simple, Efficient, Clear
Stair Steps
max
for
2
4
Short, Simple, Efficient
Stair Steps
max
lambda
inline-if
1
1
veky - 3 + fast
Weekend Counter
lambda
sum
comprehension
13
1
lambda lambda reduce lambda
Min and Max
gt
operator.gt
lt
operator.lt
operator
6
Shelter
lambduh
Completely Empty
exec
lambda
or
4
1
Duh
Completely Empty
all
map
except
try
False
1
16
Short backwards DFS
One line Drawing
set-comp
remove
min
count
or
1
2
Codeship
list > str
Champernowne Word
while
int
str
len
1
Second
Champernowne Word
while
int
str
4
Seriously?
Champernowne Word
next
map
None
count
int
3
Single dict lookup per move
Rolling 🎲!
functools.reduce
reduce
functools
get
dict
1
9
4 lines
Rolling 🎲!
replace
int
str
for
1
WWW
Rolling 🎲!
replace
int
str
for
if
15
n=10^9 in 2 minutes
Ugly Numbers
itertools.repeat
repeat
collections.deque
deque
itertools
4
2
This is BS
Ugly Numbers
while
else
int
if
8
2
2 short
Ugly Numbers
heapq.merge
merge
heappush
heapq.heappush
heappop
3
Short with Unicode and other tricks
Behind 2048
re.sub
sub
chr
r-string
ord
8
Hermit
Simple O(sqrt),10**14 in 2.7 seconds
Count Consecutive Summers
not
while
if
9
2
del a[-1:]
Backspace Apply
join
append
else
str
for
1
4
re.subn
Backspace Apply
re.subn
subn
re
not
while
6
accumulate(min)
Stock Profit
itertools.accumulate
accumulate
operator.sub
operator
sub
Patience...
Excel Column Number
indexOf
operator.indexOf
itertools.count
from_iterable
itertools.from_iterable
3
re.sub
Unique Email Addresses
set-comp
re.sub
sub
r-string
re
1
11
another numpy
Mono Captcha
numpy.reshape
reshape
numpy.array
array
next
2
4
Generator Fun
Network Loops
collections.defaultdict
defaultdict
yield
add
collections
1
1
Short, Simple, Speedy
Reverse Engineer
Fraction
fractions.Fraction
fractions
eval
set-comp
2
4
Short BFS
Anagrams By Stacks
frozenset
add
items
set
not
1
Watchtower
Short (10 lines)
Convex Hull
map
pop
index
or
sorted
1
1
Something from Nothing
Funny Addition
ljust
map
lambda
join
len
Simple
Bacteria Colonies
itertools.product
product
collections.Counter
Counter
itertools
3
4
78
Number Guess
all
max
lambda
range
comprehension
10
Just act dumb.
Number Guess
all
range
comprehension
len
for