floatNumber = 2.13400 #Method 1: use f-strings print(f"{floatNumber:.5f}") #Output: 2.13400 == '%.5f'%floatNumber #Method 2: use round print(round(floatNumber,5)) #Output: 2.134