String Manipultion in Python
Intro
Strings are immutable i.e. can't be changed
Trabersing a string
it is iterating through the elements of a string, one character at a time using for loops
String operators
Basic operators
Concatenation operator
Joins 2 strings
Replication
multiplies the string
Membership
in and not in --> case sensitive
Comparison
== is same as
!= is not equal to
the other > < used ordinal values for comparison
Ordinal value determined by ord()
Chr) gives the character for the ordinal value
String Slicing
Slicing a string
Comments
Post a Comment