23
ArchTauruS
5 21 41
3032/ 3195
Last seen 1 year ago
Member for 10 years, 8 months, 24 days
Difficulty Normal
I love coding!

Missions (145) / Solutions (218)
Best solutions / Newest solutions
Initiation
A little trick is that Python treats boolean as 0/1 when it think so ...
Correct Sentence
endswith
upper
18
1
Some tricks with max() function.
The Most Frequent
set
max
count
comprehension
1
This should not be named as a task !!!
Easy Unpack
Second
Easy Unpack
First
All the Same
set
len
First
Correct Sentence
upper
inline-if
str
Clear that you have to have a look ;)
The Most Frequent
set
max
count
comprehension
Second
The Most Frequent
set
max
count
comprehension
Clear that you have to have a look ;)
Easy Unpack
inline-if
len
Home
Seconds to Degrees
Sun Angle
datetime.datetime
datetime
or
if
3
1
Use re.search, but not re.findall.
First Word
re.search
search
re
7
3
string.find is better than string.index
Second Index
find
None
inline-if
1
A string slicing operation, with the help from trinocular operator (三元运算符)
Between Markers
find
inline-if
in
len
1
sorted, reverse, slicing, done!
Bigger Price
lambda
sorted
True
1
Use set() to make it speedy
Non-unique Elements
add
remove
continue
set
if-comprehension
Learn some things more about time module.
Date and Time Converter
time.strftime
time.strptime
strftime
time
strptime
2
Clear that you do have to have a look ;)
Morse Decoder
capitalize
get
join
split
comprehension
Second
Three Words
re.search
search
r-string
re
bool
3
Third
Even the Last
inline-if
sum
Second
Even the Last
inline-if
sum
First
Days Between
date
datetime.date
datetime
abs
Second
Popular Words
dict-comp
lower
count
split
comprehension
1
First
Pawn Brotherhood
break
in
int
str
for
job can be considered as searching for '\D+ \D+ \D+'
Three Words
re.search
search
r-string
re
bool
1
index_begin, index_end, done!
Between Markers
index
inline-if
in
str
len
Looking for protector in dictionary.
Pawn Brotherhood
f-string
break
in
int
for
Second
Second Index
find
None
inline-if
2
Clear that you don have to have a look ;)
Date and Time Converter
time.strftime
time.strptime
strftime
time
strptime
one-line
Even the Last
inline-if
sum
1
First
Three Words
isalpha
False
True
split
else
datetime did it!
Sun Angle
datetime.datetime
datetime
or
if
First
Non-unique Elements
count
append
for
if
Clear that you have to have a look ;)
Popular Words
dict-comp
lower
count
split
comprehension
First
Even the Last
except
try
sum
A simple but readable dictionary comprehension (字典解析式)
Popular Words
dict-comp
lower
count
split
comprehension
2
First, Second, OK!
Second Index
index
count
str
if
re
First Word
findall
re.findall
r-string
re
str
Clear that you have to have a look ;)
Bigger Price
lambda
sorted
True
First
Right to Left
replace
join
Second
Non-unique Elements
count
if-comprehension
list-comp
comprehension
Third
Non-unique Elements
count
if-comprehension
list-comp
comprehension
Electronic Station
Second
Digits Multiplication
functools.reduce
reduce
functools
map
replace
First
Find Sequence
map
join
if-comprehension
in
False
First
Boolean Algebra
eval
reduce() function is great for this task
Digits Multiplication
functools.reduce
reduce
functools
map
replace
3
First
Verify Anagrams
replace
lower
sorted
First
Digits Multiplication
if-comprehension
list-comp
comprehension
int
str
First
Brackets
not
join
if-comprehension
in
elif
Scientific Expedition
First
Bird Language
re.sub
sub
re
3
7
Why it is speed I think.
The Most Wanted Letter
dict-comp
isalpha
max
lower
lambda
First
I Love Python!
First
The Hidden Word
divmod
f-string
find
map
None
First
Morse Clock
isdigit
join
append
list-comp
split
1
Second
Call to Home
math.ceil
ceil
values
get
math
Second
Absolute Sorting
abs
sorted
First
Conversion into CamelCase
title
map
join
split
str
I love Python!
I Love Python!
1
First
Letter Queue
else
for
if
How ease an array can be sorted with a key?
Absolute Sorting
abs
sorted
1
Join all uppercase letters
Secret Message
isupper
join
if-comprehension
comprehension
1
First
Conversion from CamelCase
re.sub
sub
r-string
re
lower
First
Call to Home
values
bool
inline-if
sum
in
First
Time Converter (24h to 12h)
datetime.datetime
datetime
replace
if
First
Common Words
sorted
join
if-comprehension
in
list-comp
First
Absolute Sorting
abs
sorted
First
Striped Words
punctuation
string.punctuation
string
map
isalpha
Clear that you do have to have a look ;)
Pangram
all
lower
in
comprehension
1
First
Secret Message
isupper
join
if-comprehension
comprehension
First
The Most Wanted Letter
ascii_lowercase
string.ascii_lowercase
as
string
lower
Second
The Most Wanted Letter
ascii_lowercase
string.ascii_lowercase
as
string
lower
Third
The Most Wanted Letter
lower
for
if
O'Reilly
Nice and Neat!
Xs and Os Referee
inline-if
in
11
First
The Flat Dictionary
isinstance
dict
items
pop
join
time module did it
Time Converter (12h to 24h)
time.strftime
time.strptime
strftime
time
strptime
First
Count Inversions
sorted
while
range
list
len
First
Xs and Os Referee
or
elif
range
for
if
try ... except ... makes jobs easier.
Index Power
except
try
First
Index Power
inline-if
len
First
Loading Cargo
combinations
itertools.combinations
itertools
min
abs
First
Median
sort
else
len
if
Second
Index Power
except
try
1
Incinerator
Just two more attack points!
The Warriors
class
property
decorator
while
and
2
First, I think it is clear :)
Army Battles
class
staticmethod
property
decorator
extend
10
First
Dialogues
class
f-string
pass
add
None
First
Every Person is Unique
class
f-string
date
datetime.date
datetime
First
Voice TV Control
class
isinstance
inline-if
in
else
平庸
The Warriors
class
property
decorator
while
and
First
Multicolored Lamp
class
1
First
Friends
class
Exception
add
tuple
remove
Mine
str object has maketrans() and translate() functions, great!
Caesar Cipher (encryptor)
translate
str
4
Just works
Chess Knight
union
f-string
chr
add
ord
10
Clear that you do have to have a look ;)
What Is Wrong With This Family?
set
count
in
False
and
1
Second
Best Stock
max
lambda
First
Moore Neighbourhood
sum
if-comprehension
elif
and
list
f-sting makes it possible and neat in one line code done this job
Fizz Buzz
f-string
strip
or
1
Second
Fizz Buzz
strip
or
join
str
First
Cut Sentence
startswith
endswith
strip
join
elif
Since `sorted(dict, key=lambda x:dict[x])` can work, why not ...
Best Stock
max
lambda
Third
Fizz Buzz
f-string
strip
or
str
1
Clear that you have to have a look ;)
Best Stock
items
max
comprehension
First
The Greatest Common Divisor
math.gcd
gcd
functools.reduce
reduce
functools
I guess most of you did this the same.
The Greatest Common Divisor
math.gcd
gcd
functools.reduce
reduce
functools
Python Build-in Makes It Easy, Clear and Readable, text.translate(trans_table)
Caesar Cipher (encryptor)
translate
ascii_lowercase
string.ascii_lowercase
string
str
4th
Fizz Buzz
f-string
strip
or
2
First
Binary Count
bin
map
sum
list
int
First
Fizz Buzz
not
str
if
Ice Base
Second, with better understading the roman number, which I will keep it as a function.
Reverse Roman Numerals
startswith
items
replace
while
for
Second
Long Repeat
max
else
for
if
Clear code with comment, enjoy :)
Reverse Roman Numerals
re.search
search
re
bool
while
The most clear and hard solution!
Identify Block
in
if
1
First
Monkey Typing
lower
sum
if-comprehension
in
list-comp
2
So ease?
The Most Numbers
min
max
inline-if
Third
The Most Numbers
min
max
inline-if
Second
The Most Numbers
min
max
inline-if
Third
Roman Numerals
join
if-comprehension
list-comp
range
comprehension
First
Morse Encoder
get
lower
join
comprehension
2
First
Feed Pigeons
while
else
if
First
How to Find Friends
extend
pop
break
set
not
First !!!!!!!!!!!!!!!!!
Largest Rectangle in a Histogram
copy
items
pop
max
range
First
Roman Numerals
join
if-comprehension
list-comp
range
comprehension
Second
Monkey Typing
lower
sum
if-comprehension
in
comprehension
First
The Most Numbers
min
max
inline-if
First
Long Repeat
findall
re.findall
r-string
re
sorted
Second
Roman Numerals
join
if-comprehension
list-comp
range
comprehension
Alice In Wonderland
1.88400006294e-06s per call
The Shortest Knight's Path
ord
index
abs
in
if
1
4
First
The Shortest Knight's Path
index
abs
in
int
if
3
First
When is Friday?
datetime.strptime
strptime
datetime.datetime
datetime
First
The Fastest Horse
index
min
max
list
int
First
Multiplication Table
f-string
sum
list-comp
comprehension
int
1
First
Transposed Matrix
list-comp
range
comprehension
len
Second
Transposed Matrix
zip
map
list
GitHub
First
Simplify Unix Path
startswith
not
or
join
if-comprehension
Second
Create Intervals
not
sorted
append
range
len
First
Create Intervals
not
sorted
append
range
len
First
Merge Intervals
add
set
not
sorted
append
Clear that you do have to have a look ;)
Long Repeat Inside
X
re.X
findall
re.findall
r-string
First
The Most Frequent Weekdays
union
intersection
date
datetime.date
datetime
First
Area of a Convex Polygon
math.asin
asin
math.degrees
degrees
float
First, anything
Solution for Anything
class
True
First
The End of Other
endswith
False
True
len
for
First
Open Labyrinth
pop
index
while
in
append
1
Dropbox
Very Clear ~~~
Three Points Circle
eval
format
round
3
First
Friendly Number
abs
inline-if
if-comprehension
list-comp
range
Clear that you do have to have a look ;)
Simple Hashlib
hashlib.sha1
hashlib.sha224
hashlib.sha256
hashlib.sha384
hashlib.sha512
"--" bug corrected
Three Points Circle
eval
format
round
replace
Second
Friendly Number
abs
inline-if
if-comprehension
list-comp
range
First
Three Points Circle
eval
type
float
round
tuple
First
Numbers Factory
continue
or
while
in
True
First
Humpty Dumpty Form
math.tan
tan
math.sin
sin
math.atanh
Clear that you do have to have a look ;)
The Longest Palindromic
True
range
len
for
if
First
Speech Module
pass
map
join
elif
list
PyCon TW
Clear that you do have to have a look ;)
Double Substring
count
range
len
for
if
Object Oriented
Network Attack
class
object
all
not
while
First
Robot Sort
pop
max
not
join
while
First
Calculate Islands
divmod
remove
pop
sorted
while
First
Digit Stack
pop
in
elif
and
append
First
Golden Pyramid
bin
map
range
list
int
First
Simple Areas
math.pi
pi
math
len
Clear that you do have to have a look ;)
Simple Areas
math.pi
pi
math
len
First
House Password
break
in
False
True
len
Third
House Password
islower
any
isupper
isdigit
comprehension
Second
House Password
islower
isupper
break
isdigit
False
Storage
First
Square Spiral
cycle
itertools.cycle
divmod
next
itertools
18
First
Playfair Cipher
digits
string.digits
divmod
ascii_lowercase
string.ascii_lowercase
First
Restricted Prime
chr
ord
join
in
comprehension
AStar
Digging a Canal
class
insert
is
continue
pop
First
Word Pattern
all
format
zip
map
isalpha
First
Weak Point
index
min
sum
list-comp
range
First ... just works
The Rows of Cakes
hashlib.md5
md5
class
hashlib
raise
hash() and set() make unique lines
The Rows of Cakes
hash
class
raise
is
f-string
First
Skew-symmetric Matrix
all
range
comprehension
len
First
Saw the Stick
break
sum
if-comprehension
list-comp
range
1
HubSpot
First
Node Disconnected Users
values
items
pop
set
sum
So ease, int(str_number, base) ... try ... except ...
Number Base
except
try
int
First
The Hamming Distance
bin
count
First
Number Base
except
try
int
First
Restricted Sum
if
Clear!
Restricted Sum
inline-if
Second
Number Base
except
try
int
1
Blizzard
Last
Spaceship Landing Strip
all
max
if-comprehension
in
and
15
2
A solution using re module.
Stressful Subject
re.I
I
endswith
f-string
re.search
1
First
Radiation Search
union
set-comp
remove
pop
while
First
The First Working Day
datetime.timedelta
timedelta
date
datetime.date
datetime
This is Levenshtein Distance!
String Conversion
min
max
inline-if
in
list-comp
Minimum Edit Distance - Levenshtein Distance!
String Conversion
min
max
or
inline-if
append
Minimum Edit Distance - Levenshtein Distance! (min version)
String Conversion
min
range
int
len
for
First
Weekend Counter
sum
if-comprehension
list-comp
range
comprehension
First
Min and Max
hasattr
get
map
index
None
First
The Angles of a Triangle
math.degrees
degrees
math.acos
acos
round
Rock
First
Berserk Rook
itertools.permutations
permutations
itertools
pop
break
Shelter
First
ADFGVX Cipher
divmod
dict-comp
zip
isalpha
index
16
First
Ghosts Age
index
19
2
First
One line Drawing
remove
break
set
count
inline-if
Clear that you do have to have a look ;)
Completely Empty
TypeError
iter
any
except
try
Codeship
First
The Square Chest
all
sort
sum
in
list-comp
19
3
Hermit
Last
Ore In The Desert
round
remove
abs
not
list-comp
16
First
Ore In The Desert
round
abs
not
in
append
First
Mono Captcha
break
sum
while
append
list-comp
First
Keywords Finder
remove
find
sort
break
not
First
The Good Radix
max
sum
list-comp
range
comprehension
Watchtower
First
Rotate Hole
is
all
inline-if
if-comprehension
True
First
Funny Addition
sum
Escher
一般般
The Ship Teams
items
inline-if
sorted
append
for
19
大家觉得如何就如何吧...
Compass, Map and Spyglass
divmod
map
index
abs
max
First Treasures Taken
Treasures
f-string
lambda
sorted
while
in
一气呵成
The Stone Wall
divmod
enumerate
replace
max
split
好似做贼...
Keys and Locks
re.search
search
zip
map
pop
不够完美
Ground for the House
divmod
enumerate
min
replace
max
果然是贼 ...
Safe Code
eval
re.search
search
re
replace
小修改
The Stone Wall
divmod
enumerate
replace
max
split
初步实现
The Secret Room
index
not
or
sorted
join
平面几何复习题
Wild Dogs
combinations
itertools.combinations
set-comp
add
itertools
Second
Wild Dogs
combinations
itertools.combinations
set-comp
add
itertools
再修改一下下
The Stone Wall
divmod
enumerate
replace
max
split