Python classes lesson part 8: I know this code works, but I don't understand why

I’m on part 8 of the Python classes lesson. I cheated and checked the answer, but I don’t understand why the answer code runs. They have “{diameter}” in a string and I don’t understand how the computer understands to take that part of of the string and replace it with whatever variable number we input into the class. Could someone explain this to me please and thank you!

sounds like f-string, here are the python docs: