2nd Aug 2018

Python Tricks 101

By Huseyin Kaya

Python tips which are relatively uncommon and are very useful.

Swapping values

Create a single string from all the elements in list

Find The Most Frequent Value In A List.

Checking if two words are anagrams

Reverse a String

Reverse a list

Transpose 2d array

Chained Comparison

Chained function call

Copying List

Dictionary Get

Sort Dictionary by Value

For Else

Convert list to comma separated

Merge dict’s

Min and Max index in List

Remove duplicates from a list

Want more tricks look at the PyTricks github page Want to know how to create these beautiful screenshots? We got you covered, read it here