Python Tips and Tricks (July-2021)

Make your Python code efficient!

The goal of writing this post is to put together all the tips/tricks I shared on my Twitter, in a single place during the month of July-2021. I try to learn new things in Python every day and share them via Twitter. Below are the snippets and all of them self-explanatory:

1. Sum of every nth element: