Start of main content
## Python Math Snippets

The Python snippet collection contains helper functions for Python 3.6. It includes utilities for most common data types, such as primitivies, lists, dictionaries and date objects.

### Greatest common divisor

Calculates the greatest common divisor of a list of numbers.

Python, Math · Sep 15, 2020

### Least common multiple

Returns the least common multiple of a list of numbers.

Python, Math · Nov 2, 2020

### Arithmetic progression

Generates a list of numbers in the arithmetic progression starting with the given positive integer and up to the specified limit.

Python, Math · Nov 2, 2020

### Index of max element

Returns the index of the element with the maximum value in a list.

Python, Math · Nov 2, 2020

### Index of min element

Returns the index of the element with the minimum value in a list.

Python, Math · Nov 2, 2020

### Fibonacci

Generates a list, containing the Fibonacci sequence, up until the nth term.

Python, Math · Nov 2, 2020

### Clamp number

Clamps

`num`

within the inclusive range specified by the boundary values.Python, Math · Nov 2, 2020