We are going to discuss Biton strings.
The string is nothing but sequence of characters, and these characters can be of Lorqess.
Alphabets are Barcus alphabets, digits and some special characters.
A string is a sequence of characters and string and content, alphabet's digits and special characters.
Computers do not deal with the characters computer or convert them into numbers.
That is a binary number system.
That means each and every character will be represented in the form of zeros and ones.
Even though we may see characters on on screen internally, it is being stored and manipulated as combination
of zeros and ones in the binary representation.
This conversion of character to a number is called encoding, and the divorce process is known as decoding.
Say encoding means from character to the binary representation, and decoding means from the binary
presentation to the character generation.
So ASCII and Unicode are the sum of the very popular encoding techniques which you use.
So for this better idea on the python strings.
So let us go for practical demonstration right now in Python string means sequence of characters.
So let us define that.
What are the different ways to define this string in Python?
So these are where number one is here.
This will come has been enclosed within single courts.
So if we go on printing, this might instead one I'm getting this will welcome here.
Here will come is enclosed within double codes here.
Willkomm is enclosed within crippled single course.
So in this way we are getting this will come out printed.
Now here we're having this to build syndicalist triple double code.
It also can use us triple single code.
So that is not an issue.
So print Maia's DS3, it will go on printing.
That is welcome to the world of Python programming.
So triple codes, a string can extend multiple lines.
So it's in place of this single double code.
If we can put a single triple code here, then what we the outcome?
Are you going to g get any change in the outcome in the case?
So let me go for execution.
I'm finding that I'm getting the same output as a card earlier.
So accessing characters in the string.
So here my estimate is equal to language.
And then I printed this my estimate here.
So language has got printed and then I'm redoing the character at the Zero with Index.
So I shall retype this L.
So L has got printed now minus one.
That means from the last, from the back where this, this particular E is been the index minus one.
And from the front.
This E will have the index that is zero.
One, two, three, four, five, six, seven.
So if we, if we print there seven.
If it just I'm just printing here to once again.
So you can find that so in both cases, in both cases, I shall be getting these.
E has got brain dead, a seven or minus one.
So minus one means that there is a starting Kennicutt index from the from the back, from the tail of
the string.
So next one is one, two, five.
That means indicate number one, two, three and four because five will be all is exclusive to stopping
in index number will be all is exclusive.
So one, two, five minutes.
One, two, three, four.
So here we are.
We were mentioning this this one in five.
Both submitted by this column.
So that is my zero.
So zero I'm not going to take.
So that is up.
The character at the pollution index one.
So one, two, three, four.
So I'm taking this a n g you and you see we're getting this upward like this.
So now here we're having this for colon minus two, sorry, five, minus two.
So that is a five year.
So I'm going to take this one as zero.
One, two, three, four, five.
So that means we're having this one as five here.
So now we're having this one as minus two.
So that is minus one.
Minus two.
You know, that will be we'll be taking this stopping index as exclusive.
So I'll be remaining with this a only.
So it has got printed.
So that means Hypercolor minus two means from the peop character and to the minus three character.
So minus three means.
This is my minus one.
This is minus two.
And there's a minus three.
So that's what that's why he has got printed.
So but if I make this one as port.
If I make this one as full then obviously we're getting the output like this.
So that is you eight in that case.
Now here you see this 10.
The index 10 is not present here because this language is having we are having, say, eight characters.
So index will be ranging from zero to seven.
So then index is not a valid one.
So if I want to access that 10th character, so character at the 10th index.
So we are getting this index later.
So string index out of French.
So that is the error message we're getting here.
OK.
Now we're going for this.
So here you have defined this language.
So strings are immutable.
That means they cannot be changed.
But default, different strings can be assigned to the string object.
So if we bring this mindstate, I'm getting this language.
But if we if we want to object.
If we want to put another new string to this, my Estienne in December lable that is allowed by different
do our bit, the third character of the string.
That is not allowed as it is imitable.
So there is a typewriter, an esteemed object does not support item, item assignment.
So that is that there is a Ayda message are getting.
And is the other name is typing it.
Next one, we're going for the concatenation of the string.
And that can be done using plus so minus tier one and minus Jeptoo containing welcome and one blank
space.
And then two all.
So now when they're going for the concatenation, I'm getting that outcome.
This one.
So welcome to all this blank space is essential because otherwise this will come and two will not have
any separation.
So they will get concatenated side by side.
So now here you are having this.
That is my minus, dear.
Start three.
So what happen to my esteemed star?
Three.
So what did happen?
This particular my esteemed.
We'll be all cutting for my state one.
We'll be opening for three times.
So welcome.
Welcome.
So in this way, we are going to get the liquid form string so we can do the string on concatenation,
either using star or using the Bloss operators.
Now we're going we're going to discuss or place and start what I have discussed.
No, it iterating through our string here.
So later count is all digital.
So four letters in Hallowell.
If the letter is it is going to go to L..
So now letter count is plastic classical to one.
So what will happen?
So I shall go on counting the number of occurrences of L.
This may really connected.
So that's why each and every time the for loop for loop will become one kind of connected time.
And that will be put in the letters.
So if letters is really is able to l then later count will be increased by one.
And after exiting from the indentation you are getting this idea that this print is outside of the for
a loop.
So little column will be printed accordingly.
So if you're going existing, I'm getting that three times.
A letter has been found here.
Now we are going for the string membership.
So L in.
Hello.
So Ellen.
Hello.
We return to L. Norton.
Hello.
Will return false.
B in hello.
Will return false.
B Norton.
Hello.
Will return to here.
Building functions, building function.
So having this university and then we shall go for that enumerate.
So at least enumerate minus here.
So how do Lapine to go on forming this enumeration.
So Aquos to put the respective respective index.
And then we're having the respective characters here.
So in this we would have in this index zero you index one end in this way you would have in this index
nine.
Why.
Because universities having 10 characters so index will be ranging from Gedo to nine.
And in this way you are getting it.
So here you see where forming a list.
We forming a list because we're just converting it to a list.
And then the members are nothing but that doubles.
The members are nothing but the couples because they have got separated by commas and they have what
enclose within Fastback.
And so there are simply simple couples only stop couples were getting hit.
A list of minus dear will be 10 accordingly.
And here we abused the method that is the enumerate.
Now we shall deal with this single quote and double code.
So what do do we shall do that.
Let us suppose I'm going to print this one.
So when I'm going to bring this one, it is producing one error.
Why error?
Because this is a double code.
This is one double code.
So we do take this double code that the dominating as a terminating double code.
So that's why it is causing error here.
And also this.
What is it?
It is dealing that invalid syntax because the codes are not matching.
So courts are not balance.
So to right the statement here to right the string getting printed on the output.
We can go for this.
So what we're doing, we're enclosing it within.
Triple single quotes.
And this particular string is still within double code.
So now you see we're getting dot com like this.
Others, we can include the main string within single codes and put putting this one as the double code
sign here.
This particular single code is there and we are going for the escape character.
So there is a slash single code and which will be known as the escape course, the escape single codes.
So whenever we are going to print, it will bring that perspective.
Only this single code here.
So now we are having this escape being single code.
So now we have inclosing.
We're doing the reverse, actually.
Here we are for this single code as the outer one and double codes.
That is a not one.
But if you go for the double codes as the outer one and single codes as the inner one, then obviously
these single codes will get printed here.
Otherwise, we can go for this.
That means we can escaping double codes.
That means we're going for this slash double code.
So here, this double code will be treated as a cat character, not the beginning of the of the ending
of a string.
So that's why we have a win for the escaping double code.
So.
So when those strings get printed.
So slash double code will be printed as only a single double code and slash double code will be printed
as only a single as a single double code.
And here we are having this single code zero.
So that will not cause any problem.
So in this way, the string can be printed in very of ways.
So either using triple codes or using escaping the single codes, escaping the single codes once again
and then escaping the double codes once again.
Next, we are going for this, so here you see, this is the print.
I want to make it printed.
So anybody we're having double slash it will print as single slash here.
You can find we are printing this one as a single slash.
But actually, industry, we're having a double slash, so print.
This is a having a new line.
There is a slash.
So what do Lapine do?
Go to the next line.
We're having this slash.
There is a gap.
So there is a K separate.
It is there for eight characters.
And then you can also write in this way.
That is slash X 41.
So if 41 would be to date as in hexadecimal.
So what is a decimal value against.
Part two one.
So forward into six.
Into the bottom one.
That is 64 plus one.
Into six.
Into the bottom.
Zero.
That is one.
So 64 plus one.
That is 65.
Which character is having this.
Ask equals six to five.
That is of a capital A..
So it is similarly worth having this capital B..
Similarly, you are having this capital C..
So this ABC will be there.
So in this way, you can also bring the respective string.
We're having this format, so default already, Ziegel do so now we here to see these are the different
placeholders we're having dot format.
So to do will be coming to this is will be coming to this and Sunday will be coming to this placeholder.
So here we are having this default order.
If we go on printing, I'm getting the output like this one.
So today is and Sunday, so we are getting this two day is and Sunday.
So today is coming to this is is coming to this order, maintaining the order.
There is a default implicit order.
And here you are using this format method.
So already using additional argument.
So here this is my argument number G2, argument number one.
Argument number two.
So the positional arguments, the numbering will be something like this.
So here are two mentioning the argument, additional number here.
So that is up.
So one means two, they will be coming down.
So zero means is will be coming down here and sun will be coming down to this particular placeholder
during the output.
So you can find that today is and Sunday.
So ordered using your word argument.
So here you can mention this one.
I as is able to ease D as is equal to today and S is equal to Sunday.
So here you are mentioning the respective keyword arguments there.
So that is D i.
S.
And you are getting the output count output like this one.
So that is another way to print our string.
Formatting numbers.
So here to see where having this format 20 20 is only one argument is there.
So it is argument position number is zero.
So we are printing here zero.
And here you are printing zero.
But in the binary format.
So what do we the outcome in that case?
So 20 will be printed along with this 20 in the binary form.
That is 16 plus four.
And that is about 20.
So now we are having this fluff formatting floats.
We can go for this formatting.
So now we are having the zero.
That means this particular number is going to get printed.
And that will be printed in this exponentiation format.
Now, we are having this one by three and we're going to bring this one.
This apparitional argument number, Gedo and then Kolon.
There is a decimal point three F..
So after the decimal point, we'll be going to have about three decimal digits.
But having this particular strings and we're having the string method, there is a lot apart find and
we're having the plus Zinka.
Some look at all the string characters will be converted to the laughers in case up apart all the string
characters will be converted to that.
Parkin's irrespective of the initial case here.
So find two.
So this tool be found at the totin index.
So let me go on counting here.
So that is about Gedo.
One, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve.
And from the Totin Index, this two is beginning.
So that's why I'm getting here 13.
But if you go on searching this to all this DNA or in the Lorqess, you may not get a match because
it is a gift sensitive find.
So as it is I of that, it will give me the outcome as a minus one means unsuccessful searching.
So ripest all by everybody.
And it is all by everybody.
Know Hennessy there that if you consider the case insensitivities, if it were getting a match.
So all would be replaced by everybody.
But here this all is written all in the works.
So hll so everybody cannot replace it.
So because that is not a no match has been absol using this it Iblis method.
So in this way we have discussed that how to operate the string and what other different string methods
and operations can be carried out in this session.
Thanks for watching this video.