a library (lib) is a collection of packages and modules
the terms of package and library are often used interchangeable
a package (pkg) aims to sovle a particular problem
a package contains models (mod) i.e. functions, methods etc.
a package organises its models in a directory structure that contains __init__.py
the terms of package and library are often used interchangeable
a module (mod) is a single python scritp viz. itis a single python file, ending with .py
a module can be organised wiht other moduls in a directory called a package
a module can contain functions, attributes, additional models etc.
a module specifies functions, methods, types etc.
a module is build to solve specific problems
a module or a specific function from a model needs to be imported to use it
in python more or less everything is an object
a function inside an object is called method
methods are functions only available to a specifc python objetc (i.e. strings, floats, lists etc.)
methods have dot-notation and round brackets
a function performs a taks (while attribute have only values)
argument viz. parameters are fed into a function
attributes have dot-notation, but no round brackets
attributes have value, while functions performe a task
attributes are characteristics of an object viz. they store data about an object's propertie and behaviour
arguments are called parameters too
arguments are the data structure viz. value that is passed inside a function
help(function) #gives the arguments of a function etc.
separated by a comma
keyword = value
an expression is the representation of a value
the value that is iteratored over, e.g. elemets in lists
the thing that is interated on, e.g. a list of elements
parameter, also called arguments, are the values that are passed into a function
the python code from packages is referred to as source code
row in a data table
string: <class 'str'>
float: <class 'float'>
integer: <class 'int'>
boolean: <class 'bool'>
bool(0) creates False
bool(1) creates True
bool(2) creates True
bool("a") creates True
list: <class 'list'>
set: <class 'set'>
dictionary: <class 'dict'>
tuple: <class 'tuple'>