Python String
A string represents the group of characters. String are important because most of the data we use in daily life will be in the form of string. Example: name of the person, the address etc. In python str datatype represents a string. Since every string comprises several characters, python handles string and characters almost the same manner. There is no separate datatype to represent individual characters in python. Creating Strings We can create a string in python by assigning a group of characters to a variable. The group of characters should be enclosed inside single, double or triple quotes as shown in an example: S1= ‘Welcome to pythonior.com’ S2= “Welcome to pythonior.com” S3=“‘Welcome to pythonior.com”’ It is possible to display quotation marks to mark a substring in a string. In this case you should use one type of quotes for outer string and another type of quotes for inner string as: S1 = ‘ welcome to “ python” tutorial’ ...