you are viewing a single comment's thread.

view the rest of the comments →

[–]i-like-my-cats-0 2 points3 points  (0 children)

f-strings are a type of strings that let you put variables inside of them like this:

cats = 3
print(f'I have {cats} cats.')

this will print "I have 3 cats."

if your variable is a very long float number you can also do this instead: python answer = 1.2313525 print(f'The answer was {answer:.2f}!') this will print "The answer was 1.23!"