Strings
lege
Col
String is data type that stores a sequence of characters.
pna
Basic Operations
concatenation
A
“hello” + “world” “helloworld”
length of str
len(str)
, Indexing
Apna_College
ge
0 1 2 3 4 5 6 7 8 9 10 11
olle
na
str = “Apna_College”
C
Ap
str[0] is ‘A’, str[1] is ‘p’ ...
str[0] = ‘B’ #not allowed
lege
Col
String is data type that stores a sequence of characters.
pna
Basic Operations
concatenation
A
“hello” + “world” “helloworld”
length of str
len(str)
, Indexing
Apna_College
ge
0 1 2 3 4 5 6 7 8 9 10 11
olle
na
str = “Apna_College”
C
Ap
str[0] is ‘A’, str[1] is ‘p’ ...
str[0] = ‘B’ #not allowed