A approach that can be used, without some external library, just with built-in functions and data structures from python, is:
values = [1, 2, 3, 4, 5, 6, 7]
values_mean = sum(values) / len(values)
variance = sum((val - values_mean) ** 2 for val in values) / len(values)
std_dev = variance ** 0.5