40
Awesome Team
Alexander Lyabah
http://www.checkio.org/user/oduvan/
Last seen 13 hours ago
Member for 13 years, 10 months, 21 days
Difficulty Easy
love it!
немного по условиям еще подсказка
return None
можно просто заменить на
return
а условия можно просто объединить через `or`
итого это
if text.find(symbol) == -1:
return None
if text.count(symbol) == 1:
return None
можно заменить на
if text.find(symbol)
More
Попробуй еще сделать вариант, где мы проверяем в начале, что есть 2 символа и тогда уже делаем все необходимые вычисления.
More
text.split(symbol)
используется 3 раза. Действительно имеет смысл задуматься о том, чтобы сделать отдельную переменную для этого.
More
1. Что такое 26?
2. Попробуй это решить без использования set
3. Пробелы между операторами это все еще круто :)
More
[sorted](https://docs.python.org/3/library/functions.html#sorted) function has an attribute reverse .
More
Not a very effective, but definitely very interesting and educational. :)
Thank you.
More
if condition:
return True
else:
return False
is the same as
return condition
or
return bool(condition)
More
Well, it might be sometime confusing that text1 and text2 are not even strings
More
line 3: do we really? really-really wants to use _ as a variable name?
More
I wouldn't say this is a very fast way to solve. You should go through all the elements of instructions 4 times.
More