Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
Lecture 27: String Data Type
Nafees AI Lab
Follow
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.
Category
π
Learning
Transcript
Display full video transcript
00:00
Hello, welcome back.
00:05
In the last lecture, we have discussed all the numeric data types.
00:12
Now, we move our ordered sequence to move on
00:15
and first we will learn string data types.
00:19
I remember that this ordered sequence is ordered sequence.
00:23
Now, we have ordered and unordered.
00:29
First, I will tell you the definition of text book definition.
00:34
It is a string sequence of characters.
00:39
Now, if I write,
00:43
Hello, I am a good guy.
00:46
What are characters in a sequence?
00:51
If I change sequence,
00:53
then you will not understand meanings.
00:55
Like I do.
00:58
Does this make sense?
01:00
No.
01:02
If I change sequence,
01:05
then the sentence has its meaning.
01:08
Because it is ordered.
01:11
It means that Python has a individual character
01:15
where it exists.
01:18
So, it will be traced.
01:20
Okay.
01:21
Now, we will go back to the string.
01:23
Now, we will go back to the string.
01:24
Now, we will go back to the string.
01:26
There are three ways.
01:27
Now,
01:28
because the string in English,
01:30
the comma exists.
01:32
So,
01:33
let's say,
01:35
message is equal to single quote.
01:39
We will put quotation marks.
01:43
This is message.
01:46
This is message.
01:48
M-E-S-S-S-E-G.
01:49
Message.
01:50
Okay.
01:51
Now, I print it.
01:52
No surprise.
01:53
I print.
01:54
No surprise.
01:55
Then, message will be displayed.
01:57
Make sense?
01:58
I run it.
01:59
This is message.
02:00
However,
02:01
however,
02:02
if
02:03
if
02:04
if you know English
02:05
in English,
02:06
there is a name of grammar.
02:07
And in grammar,
02:08
there is an apostrophe.
02:09
There is a quotation.
02:10
Let's say,
02:11
this is
02:12
M-E-S-S-E-S-S-E-S-E-G.
02:15
Yes.
02:16
What is this?
02:17
What is this?
02:18
Now,
02:19
I-D-E
02:20
J-E-B
02:47
string ko represent karne ka wohi double quotes.
02:49
Toh agar mein ab double quotes me is ko Ϊalta hoon.
02:51
Now its happy.
02:53
This is motion's message.
02:55
This is motion's message.
02:57
Right run
02:59
You get the point.
03:01
Ab
03:03
Abnei gawr karna hai.
03:05
Abnei double quote Ϊal diya.
03:07
Toh chaliyye.
03:09
Let's say mein kehta hoon quote.
03:11
Define karte hai.
03:13
Quote.
03:15
Or us quote ke anndar
03:17
Hem eek
03:19
Quote liknay lega hai.
03:21
Or quote mein kehta hoon
03:23
I remember you said
03:27
Colon
03:31
Quote.
03:33
Never give up.
03:35
Make sense?
03:37
Haan.
03:39
He toh confused hoogya python.
03:41
Woh kehta hai.
03:43
If you have to be here
03:45
Toh tuhaarhi string here
03:46
However,
03:47
How ever,
03:49
Now,
03:50
Inglish grammar ke anndar
03:51
You have to quote.
03:52
If you have to quote,
03:53
You have to quote.
03:54
Confusion.
03:55
Confusion.
03:56
This is why
03:57
Doh tariqe hoon.
03:58
Single quote.
03:59
If you have to quote.
04:00
If you have to quote.
04:01
Now,
04:02
it is going to be the very happy person.
04:05
Now,
04:06
it is going to be the very happy person.
04:07
I remember you said never give up.
04:10
Okay.
04:11
Excellent.
04:12
So,
04:13
This is two way.
04:14
A string ko represent.
04:15
However,
04:17
If I have a full paragraph,
04:20
Multi line paragraph,
04:22
This is a multi line paragraph.
04:23
This is a multi line paragraph.
04:24
This is a multi line paragraph.
04:25
I will quote.
04:26
Sorry.
04:27
This is a line.
04:28
This is a line.
04:29
But when I have to quote,
04:31
If I have a new line line,
04:33
Then again,
04:35
The structure string ko,
04:36
Python lose.
04:37
This is a multi-quote.
04:38
So,
04:39
I don't understand.
04:40
It's totally.
04:41
Interesting enough.
04:42
To be sure.
04:43
I don't understand this.
04:44
Totally.
04:45
Interesting enough.
04:46
So,
04:47
To be sure.
04:48
Multi line paragraph.
04:49
Multi line passage.
04:50
Multi line string ko represent.
04:51
The third method.
04:53
That is our triple quotes.
04:54
I will say.
04:55
It is a triple quotes.
04:56
I will say.
04:57
This is a variable.
04:58
It will be a multi-quote.
04:59
And,
05:00
I will say.
05:01
I will say.
05:02
It will be a variable.
05:03
It will be a multi-quote.
05:04
Multi-quote.
05:05
Multi-quote.
05:06
multi underscore line
05:08
is equal to
05:10
now you have to go on
05:11
1, 2, 3
05:12
when I put this 3
05:15
then I can basically
05:16
I can just insert the line
05:19
even in full paragraph
05:20
I can do it
05:21
but then I can close the line
05:23
then I can do it
05:26
1, 2 and 3
05:28
now it's happy
05:29
if I put this line
05:32
I can do it
05:34
now I can do it
05:36
now I can do it
05:38
now it's happy
05:40
makes sense
05:42
there are 3 different ways
05:44
single code, double code and triple code
05:46
triple code
05:48
single and double
05:50
alternatively use
05:52
you can use any
05:54
just to make sure
05:56
if you start using single code
05:58
if you start using single code
06:00
just to be consistent
06:02
you
06:04
you
06:06
you
06:08
you
06:10
you
06:12
you
06:14
you
06:16
you
Recommended
10:27
|
Up next
Lecture 20: Data Types and Basic Arithmetic in Computer Language
Nafees AI Lab
5/13/2025
3:04
Incredible kitchen hacks that always work π€©
MetDaan Creative
today
1:12
Gift wrapping ideas for any geometric shape!
MetDaan Creative
yesterday
0:28
Craft your own Christmas tree this year! π
MetDaan Creative
yesterday
11:34
Power BI Magic: Easy 30-Day Sales Calculations Made Simple
expertiseexcelerate
7/7/2025
13:41
Discover Power BI Desktop's Hidden Scenario Analysis Secrets!
expertiseexcelerate
7/7/2025
7:40
Mera Mazloom Hussain | Nadeem Sarwar 2020 | 1442
Gham-e-Hussain | ΨΊΩ Ω ΨΨ³ΫΩΨ
6/9/2025
13:27
Time Intelligence PROBLEMS SOLVED?
expertiseexcelerate
1/7/2025
9:38
Episode 1 β The Curious Boy from Ulm (1879-1895)
Nafees AI Lab
6/8/2025
0:37
Top Fully Funded Scholarships in Germany 2025 π©πͺ | Apply Now!
Nafees AI Lab
6/3/2025
0:25
The Boy and the Dragon β βA Friend in the Skyβ
Nafees AI Lab
6/3/2025
1:03
Why Do Rainbows Appear? π | Physics in Everyday Life
Nafees AI Lab
6/3/2025
0:28
Albert Einstein: The Genius Who Changed Time
Nafees AI Lab
6/1/2025
0:40
Stephen Hawkingβs Life in 60 Seconds: From Wheelchair to the Universe
Nafees AI Lab
6/1/2025
0:36
The Forgotten Night Hitler Was Nearly Killed
Nafees AI Lab
5/29/2025
0:31
Dilip Kumar β The Tragedy King of Bollywood
Nafees AI Lab
5/29/2025
0:45
Marlon Brando β The Rebel Who Redefined Acting | Nafees AI Lab
Nafees AI Lab
5/29/2025
0:29
Charles Darwin β Evolution & Natural Selection | Nafees AI Lab
Nafees AI Lab
5/28/2025
0:30
Isaac Newton β Gravity, Motion & Genius | Nafees AI Lab
Nafees AI Lab
5/28/2025
0:52
Allama Iqbal β Poet of the East | Nafees AI Lab
Nafees AI Lab
5/28/2025
0:53
Marie Curie β Life & Achievements | Nafees AI Lab
Nafees AI Lab
5/28/2025
0:42
Albert Einstein β Life, Legacy & Discoveries | Nafees AI Lab
Nafees AI Lab
5/28/2025
10:08
Pandas Class 10: Manipulating Data β Sorting, Renaming & More
Nafees AI Lab
5/28/2025
12:30
Pandas Class 09: Adding & Removing Data in Pandas
Nafees AI Lab
5/28/2025
11:25
Pandas Class 08: Changing Data in Pandas β Replace & Update
Nafees AI Lab
5/28/2025