Posts

Showing posts with the label chapter3

Chapter 3 : "PYTHON" (STRING'S)

Image
Chapter 3                                           STRING'S String is a data type in Python. String is a sequence of characters enclosed in quotes .We can primarily, write a string in these three ways 1. Single quoted strings   ( a = "Harry") 2. Double quoted strings ( b = "Harry" ) 3. Trible quoted Strings  (c  = '!' Harry" ) String Slicing:                                     A String in Python can be sliced for getting a part of the string . Consider the following "string" : name= "[Harry]" => length = 5               0 1 2 3 4         (-5) (-4) (-3) (-2) (-1)                 ...