Libraries A Python library is a collection of files, known as modules, that are available for other programmers to use. These modules contain code for common programming tasks, ranging from interacting with hardware to accessing web pages. Built-in modules The library that comes with every installation of Python is called the Python Standard Library. It contains modules, such as Tkinter and turtle, which are available without the need to download or install any additional code.
random This module enables programs to include calculations or outputs based on random numbers. This can be useful when a programmer wants to create an element of chance.
datetime The datetime module allows a program to work with calendar dates and functions that can calculate the time between dates.
webbrowser The webbrowser module allows a Python program to open a browser on the user’s computer and display links.
turtle This Python module recreates the turtle-shaped robot from the programming language Logo. The robot draws on the screen as it moves around.
socket The socket module allows programs to communicate across networks and the Internet. This module allows programs to create their own sockets.
time The functions in this module deal with time, such as those relating to time measured by the computer’s processor and time zones for different countries.
Tkinter The Tkinter module allows programmers to create a graphical user interface (GUI) for their code, including elements such as buttons and menus.