41
f-strings are a modern and easy way to put variables inside text. You put an 'f' before the quotes and the variable inside curly brackets {}.
f"Price is {cost} Naira". It’s much cleaner than using the + sign everywhere. I highly recommend using them; they make your code look professional.
Log in to add a comment.