31
Andrey Solomatin
Last seen 1 year ago
Member for 11 years, 2 months, 8 days
Difficulty Normal
[check my way of unpacking cmd](http://www.checkio.org/mission/letter-queue/publications/Cjkjvfnby/python-3/deque/)
More
stack is bad name for queue
list is not best collection type to implement queue, you can use collection.deque
More
**print("Some Problems")** there should be no problems by task rules. And you will not see this prints when test system checks you solution.
More
http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/
no: **i.count("PUSH") > 0** yes: **"PUSH" in i**
More
It is bad practice to catch all exception, better to specify one.
Try to find out what will happened in case ''[1::]
result[1::] => result[1:] # same effect less code
More
1 and 4 lines has no sence. Please proofread your solution before publish.
More
If you use variable only once, just dont use it. Convertion to string in line 2 can be placed to line 4.
Python style guide recommends to name variables in snake case.
You can use int instead of ords.
More
See comments [here](http://www.checkio.org/mission/secret-message/publications/theholy7/python-3/first/)
More
It is not fits to clear.
You can throw away you **re.sub** and use **str.replace**.
More
If you can import you can use https://docs.python.org/2/library/heapq.html#heapq.nlargest
import are prohibited by description "Some builtin functions are closed here: import, ..." You use issue in task checker for your solution.
More
You call key twice on each compare.
So you will have issue in certain cases: (key=next)
You need only one call per item.
flexible_reduce is just proxy for call another function, you can remove it.
More