N
N
Nick Sl2021-10-31 17:40:28
Python
Nick Sl, 2021-10-31 17:40:28

What does this sign ": ." after PI?

What does this sign : .after PI do?

pi=3.141592
b=f'{pi:.3f}'
print(b)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-10-31
@nmkru

These are two signs. One separates the variable name from the format specifier, and the second specifies the number of characters after the decimal point.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question