Formatting and Displaying Pi to Two Decimal Places Using F-Strings

Below is an approximation of pi: 
pi = 3.1415926535
Using f-string formatting, print the approximation of pi to two decimal places as shown below.

Output: Pi: 3.14

Solutions

Solution: 1

pi = 3.1415926535

print("Pi: {:.2f}".format(pi))