os for operating systems
collections for advanced data structures
string for string operations
logging to log information testing software
subprocess to run terminal commands
modules need to be installed
import modul_name #imports the modul 'modul_name'
from modul_name import function #imports only a function from a package or modul
from modul_name import func1, func2 #imports only functions func1 and func2 from a package or modul
.date #creates a yyyy-mm-dd date
.chdir() #changes the directory
.getcwd() #gets the current working directory
attributes
.environ #gives the local environment
sqrt
etc.
mode
mean
etc.
libraries hold a collection of moduls
pip install the_libary #installs the library
pip stands for preferred installer program
after a library is installen, we can import the moduls
from the_libary import the_modul #imports the modul from the library
https://www.geeksforgeeks.org/python-collections-module/
Counter()
from collections import Counter
defaultdict()
from collections import defaultdict
.most_common()
namedtuple()
from collections import namedtuple
SpeciesDetails = namedtuple("SpeciesDetails", ['species', 'sex', 'body_mass'])
print(Counter([item["Property"] for item in items_dict]))