Python Basics

Python find largest N (top N) or smallest N items

Python examples to find the largest (or the smallest) N elements from a collection of elements using nlargest() and nsmallest() functions from heapq library. 1. Using heapq module’s nlargest() and nsmallest() Python heapq module can be used to find N largest or smallest items from collections. It has two functions …

Python Unpack Tuple with Variable Length

Python example to unpack tuple or sequence or iterable such that the tuple may be longer than N elements, causing a “too many values to unpack” exception.

Python Httplib2

Python httplib2 module provides methods for accessing Web resources via HTTP GET and POST requests, authentication, caching, redirects, and compression.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.