In some situations you will want to use a variable's value inside a string.
For example, you might want to use two variables to represent the first name and the last name respectively,
and then combine those values to display someone's well, full name.
So here we will write first name.
Or actually, let's instead of Y.
Let's make manipulations on Oxford Academy's string.
So.
Let's make the.
First name.
First name here, it's Oxley.
And here last name is Academy.
So now we will we will write full name.
It's going to be.
Here.
F here.
First name.
And last name.
And after that we will print the full name.
Let's increase the text size a little bit so you can see it better.
A thanks.
Let's make the text size 33.
That's perfect.
So here to insert a variable's value into a string.
Oops.
Insert variable's value into a string place the letter F.
Sorry.
Here, place the letter F.
Immediately before opening a quotation mark here.
What?
Braces a random name.
Like this.
But prices around the name.
Or names of any variable you want to use inside the string.
So Python will replicate or replace each variable with its value when the string is displayed.
In this case, it's going to be Oxley and then Academy in the full name.
So the strings are called.
These strings are called F strings here F.
Strings.
F strings and the F here.
The F here is for format.
Format.
Because Python formats the strings by replacing the name of any variable in braces with its value.
So the output here, let's run this here.
Let's print the full name and clear the screen for now.
Now let's run the name here.
And as you can see here, we got the Oxley and Academy in same string.
So you can do a lot with F strings.
For example, you can use F strings to compose complete message using the information associated with
the variables.
So now let's try this.
Now instead of.
And yes, inside print.
Feel that print.
Hello.
And after that we will use.
Full name.
Title.
And that's it.
So now.
The full name.
The full name is used in a sentence that greets the user and after that the title.
So our.
Here.
So our names is going to be uppercase or OC.
Sully.
And again uppercase A.
Academy.
That's it.
So.
No, let's let's run firstly here.
And as you can see here, we got this here.
Hello.
Oxley Academy.
We got these because we have to use this quotation mark.
Not here.
And this quotation mark, not here at the end of this year.
Outside the brace.
Now let's run this.
And as you can see here, we got this as an output.
So you can do a lot with format strings.
So.
Now.
So this quote displays this message as well.
But you signing the message to a variable, We make the final print.
How much simpler here?
So let's instead of this, let's delete this braces, delete this print function.
And now we will write message here.
So we got the first name, last name, full name and message.
All right.
So now we will just print the message and we will get the same output again.