1 min to read
Learn new tricks in python daily with one new snippet
Note: this post is updated regularly. Check back for new snippets.
py day 1 Merge two Py dictionaries
py day 2 Swap two variables in place
In this snippet we swap two variables in python inplace (without using another variable)
py day 3 Return Multiple values from a function
We’ll learn how to return multiple values from a function.
py day 4 Check for anagrams
We’ll learn how to check whether two values are anagrams of each other in one line in python.
py day 5 Reverse a list in one line
py day 6 Empty a list in python
py day 7 Select a Random Element from a List
Py Snippets Daily