How to use Python3 new feature : "f-string" to output the first 50 bits of math.pi?
We can achieve it by the following 2 old ways:
1 ("%.50f"% math.pi)
2 '{.50f}'.format(math.pi)
But for the new feature "f-string",I knew that we can use this format:
f"the value of pi is {math.pi}", but how to limit and filter the first 50 bits?
In [2]: ("%.50f"%math.pi)
Out[2]: '3.14159265358979311599796346854418516159057617187500'