python examples

Sep
13
Python program to find the square root

Python program to find the square root

Python example to find the square root of both integer and complex numbers in Python 3.
1 min read
Sep
13
Python program to convert degree to radian

Python program to convert degree to radian

Python example to convert degrees to radians and vice versa.
1 min read
Sep
07
Find Duplicate Characters in a Python String (2 ways)

Find Duplicate Characters in a Python String (2 ways)

A common interview question. Learn to find duplicate characters in a string (2 ways).
1 min read
Sep
07
Finding N Largest(Smallest) items in Python with Heapq

Finding N Largest(Smallest) items in Python with Heapq

A simple way to return the N largest or smallest elements using the heapq module in Python 3.
2 min read