This article describes both of them in more details, but in short, we define $|| x ||_p$ as p-norm.
p-norm: Given $x$, a vector with $i$ components, a p-norm is defined as:
$|| x ||_p = \left(\sum_i |x_i|^p\right)^{1/p}$
The simplest norm conceptually is Euclidean distance. This is what we typically think of as distance between two points in space:
2-norm (Euclidean distance ro L2-norm)
$|| x ||_2 = \sqrt{\left(\sum_i x_i^2\right)} = \sqrt{x_1^2 + x_2^2 + \ldots + x_i^2}$
1-norm (Manhattan distance or L1-norm)
$|| x ||_1 = \sum_i |x_i| = |x_1| + |x_2| + \ldots + |x_i|$
Python implementation
If you want to calculate them in Python, numpy.linalg.norm provides functions for it. In addition, you can use Distance computations (scipy.spatial.distance) library. For example, for the Euclidean distance between two vectors, $a$ and $b$, you can use the following code:
from scipy.spatial import distance
distance.euclidean(a, b)
and if you want to calculate the Manhattan distance, you can use the following code:
from scipy.spatial import distance
distance.cityblock(a, b)
How did I know this time it is called cityblock? I read the documentation and looked up for Manhattan distance.