

A common example is processing lines in a file where the lines (or something within them) maps to other data. The need for an ordered dict comes up surprisingly often.

collections.OrderedDictĬollections.OrderedDict gives you a dict that will preserve the order in which items are added to it note that this is not the same as a sorted order. If you’ve been working with Python for any length of time, it is very likely that you have made use of the this module however, the batteries contained within are so important that we’ll go over them anyway, just in case. collectionsįirst up we have the collections module. In this chapter we will mention a few libraries that every Python programmer should know very well. This is understandable because most Python applications deal with input processing however, the Python standard library is very rich and includes a bunch of additional functionality that many Python programmers take too long to discover.

The libraries that tend to get all the attention are the ones heavily used for operating-system interaction, like sys, os, shutil, and to a slightly lesser extent, glob. Let’s start by taking a look at the standard library. Rather than focusing on those standouts, this report is instead going to focus on several interesting libraries that are growing in popularity. Many high-quality third-party libraries are already well-known, including Numpy and Scipy, Django, Flask, and Requests you can easily learn more about these libraries by searching for information online. We’re also going to discuss several exciting, lesser-known libraries from the third-party ecosystem.
#Fews python library trial
Get a free trial today and find answers on the fly, or master something new and useful. Join the O'Reilly online learning platform.
