islice allow you to get the first N items of an iterator, but since it doesn't accept negative indexes - you can't use it to get the last N. The solution is very simple - use deque.
If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions
Subscribe to:
Post Comments (Atom)
2 comments:
You have broadened my knowledge :)
Love it when its small a simple. Thanks.
Thanks for sharing the comment. Keep updating more and more
SEO Training
Java Training
python Training
Salesforce Training
Tableau Training
AWS training
Dot Net Training
DevOps Training
Selenium Training
Post a Comment