9
Oleg Korsak
https://google.com/+OlegKorsak
Last seen 4 years ago
Member for 11 years, 1 month, 8 days
Difficulty Normal
nice. but while you are trying to reduce line count you are violation PEP-8 and readability :)
More
with try-except there is less conditions to check.
https://checkio.org/mission/index-power/publications/kamikaze/python-3/first/
More
1) you don't need a result variable at all.
2) >= 10 is equal to >9
just return any(i.isupper() for i in data) and any(i.islower() for i in data) and any(i.isdigit() for i in data) and len(data) > 9
Think about optimization. Because you iterate data for 3 times, this is not optimal way.
More
no need to estimate abs() every time. Just call it once and store result into variable
More
this is veeeery huge. and you are replacing so many times across whole resulting ss string
More
don't pay with readability for lesser line count.
there is no need in braces for "not"
also "if not i.isalpha()" == "if i.isdigit()", less to write, less to execute
More