A String in Python is any sequence of characters.
Strings are created by writing
s="Hello"
or s='Hello'
Strings can be accessed using indices just like lists.
"Hello"[0]=H
Strings are immutable, so "Hello"[0]="D" type statements are not allowed.
Special functions in lists.
A String in Python is any sequence of characters.
Strings are created by writing
s="Hello"
or s='Hello'
Strings can be accessed using indices just like lists.
"Hello"[0]=H
Strings are immutable, so "Hello"[0]="D" type statements are not allowed.
Special functions in lists.