18
Genadii K
Last seen 4 months ago
Member for 5 years, 6 days
Difficulty Normal
Not bad!
A couple of points for potential improvement:
Lines 3-6 look redundant. 'If' statement executes a block of code if a specified condition is true, or 'else' block if it's false. So, you could just replace the mentioned lines with 'return len(set(text)) == len(text)'
Taking that into accou
More
Well done.
Take a look into **capitalize()** string method. It can make you code more concise. :)
More
Very good!
Worth to mention that pop method removes the last element by default and returns it. So, lines 6-7 can be refactored into more concise way:
state.insert(0, state.pop())
More
Not bad.
But I would use more meaningful variable names for those who see the code the first time (or for future me. ;)
More