Skip to playerSkip to main contentSkip to footer
  • 5/15/2025
Strings are one of the foundational data types in programming and have a crucial role in machine learning. They are sequences of characters and can encapsulate textual data, making them incredibly versatile.
Transcript
00:00Hello, welcome back.
00:05In the last lecture, we have discussed all the numeric data types.
00:12Now, we move our ordered sequence to move on
00:15and first we will learn string data types.
00:19I remember that this ordered sequence is ordered sequence.
00:23Now, we have ordered and unordered.
00:29First, I will tell you the definition of text book definition.
00:34It is a string sequence of characters.
00:39Now, if I write,
00:43Hello, I am a good guy.
00:46What are characters in a sequence?
00:51If I change sequence,
00:53then you will not understand meanings.
00:55Like I do.
00:58Does this make sense?
01:00No.
01:02If I change sequence,
01:05then the sentence has its meaning.
01:08Because it is ordered.
01:11It means that Python has a individual character
01:15where it exists.
01:18So, it will be traced.
01:20Okay.
01:21Now, we will go back to the string.
01:23Now, we will go back to the string.
01:24Now, we will go back to the string.
01:26There are three ways.
01:27Now,
01:28because the string in English,
01:30the comma exists.
01:32So,
01:33let's say,
01:35message is equal to single quote.
01:39We will put quotation marks.
01:43This is message.
01:46This is message.
01:48M-E-S-S-S-E-G.
01:49Message.
01:50Okay.
01:51Now, I print it.
01:52No surprise.
01:53I print.
01:54No surprise.
01:55Then, message will be displayed.
01:57Make sense?
01:58I run it.
01:59This is message.
02:00However,
02:01however,
02:02if
02:03if
02:04if you know English
02:05in English,
02:06there is a name of grammar.
02:07And in grammar,
02:08there is an apostrophe.
02:09There is a quotation.
02:10Let's say,
02:11this is
02:12M-E-S-S-E-S-S-E-S-E-G.
02:15Yes.
02:16What is this?
02:17What is this?
02:18Now,
02:19I-D-E
02:20J-E-B
02:47string ko represent karne ka wohi double quotes.
02:49Toh agar mein ab double quotes me is ko ڈalta hoon.
02:51Now its happy.
02:53This is motion's message.
02:55This is motion's message.
02:57Right run
02:59You get the point.
03:01Ab
03:03Abnei gawr karna hai.
03:05Abnei double quote ڈal diya.
03:07Toh chaliyye.
03:09Let's say mein kehta hoon quote.
03:11Define karte hai.
03:13Quote.
03:15Or us quote ke anndar
03:17Hem eek
03:19Quote liknay lega hai.
03:21Or quote mein kehta hoon
03:23I remember you said
03:27Colon
03:31Quote.
03:33Never give up.
03:35Make sense?
03:37Haan.
03:39He toh confused hoogya python.
03:41Woh kehta hai.
03:43If you have to be here
03:45Toh tuhaarhi string here
03:46However,
03:47How ever,
03:49Now,
03:50Inglish grammar ke anndar
03:51You have to quote.
03:52If you have to quote,
03:53You have to quote.
03:54Confusion.
03:55Confusion.
03:56This is why
03:57Doh tariqe hoon.
03:58Single quote.
03:59If you have to quote.
04:00If you have to quote.
04:01Now,
04:02it is going to be the very happy person.
04:05Now,
04:06it is going to be the very happy person.
04:07I remember you said never give up.
04:10Okay.
04:11Excellent.
04:12So,
04:13This is two way.
04:14A string ko represent.
04:15However,
04:17If I have a full paragraph,
04:20Multi line paragraph,
04:22This is a multi line paragraph.
04:23This is a multi line paragraph.
04:24This is a multi line paragraph.
04:25I will quote.
04:26Sorry.
04:27This is a line.
04:28This is a line.
04:29But when I have to quote,
04:31If I have a new line line,
04:33Then again,
04:35The structure string ko,
04:36Python lose.
04:37This is a multi-quote.
04:38So,
04:39I don't understand.
04:40It's totally.
04:41Interesting enough.
04:42To be sure.
04:43I don't understand this.
04:44Totally.
04:45Interesting enough.
04:46So,
04:47To be sure.
04:48Multi line paragraph.
04:49Multi line passage.
04:50Multi line string ko represent.
04:51The third method.
04:53That is our triple quotes.
04:54I will say.
04:55It is a triple quotes.
04:56I will say.
04:57This is a variable.
04:58It will be a multi-quote.
04:59And,
05:00I will say.
05:01I will say.
05:02It will be a variable.
05:03It will be a multi-quote.
05:04Multi-quote.
05:05Multi-quote.
05:06multi underscore line
05:08is equal to
05:10now you have to go on
05:111, 2, 3
05:12when I put this 3
05:15then I can basically
05:16I can just insert the line
05:19even in full paragraph
05:20I can do it
05:21but then I can close the line
05:23then I can do it
05:261, 2 and 3
05:28now it's happy
05:29if I put this line
05:32I can do it
05:34now I can do it
05:36now I can do it
05:38now it's happy
05:40makes sense
05:42there are 3 different ways
05:44single code, double code and triple code
05:46triple code
05:48single and double
05:50alternatively use
05:52you can use any
05:54just to make sure
05:56if you start using single code
05:58if you start using single code
06:00just to be consistent
06:02you
06:04you
06:06you
06:08you
06:10you
06:12you
06:14you
06:16you

Recommended