Strings in python
What is a String?
string is a sequence of characters enclosed in single quotes( ‘ ‘ ) or double quotes ( ” ” ).there is no separate data type for a single character in python,in python single character is also called as a string,example is given below

purple color readings are index numbers,strings always starts with 0th index number. Space comma ( , ) every thing inside quotes ( ” ” ) are considered and has its own index value
we declared a variable and stored a string “code skulls” ,so now we will access each element in the string using its index value
there are two ways to access characters in the string,one is index numbers starting from zero,other is -1 is and subtracting -1 for each element from rear end

counting length of string
there is a function called len(),which returns the length of string
suppose we need double quotes inside the string like the example give below
if you execute the above line. python will throw an error ,we should put the whole line again in double quotes
Concatenation of strings
joining of strings is know as string concatenation ,we use plus ( + ) operator to joiin two strings ,example is given below
output
if we need concatenate string and number ,we need to use double quotes for the number
the above code gives error. Know as
we should replace ,the number with double quotes or we can use str( ) function to covert number to string
String Repetition Operator (*)
if we need to repeat a string multiple times,we should use asterisk ( * ).
existence of a character or a sub-string in a string:
we use keyword in to check the sub string in the string
Slicing Strings
slicing strings is also know as dividing the main string into sub strings. We can make sub strings by providing two attributes starting index ending index,syntax is given below
we see some examples,but first we will declare a string
if we print string directly,we will get codeskulls as an output
the above lines returns ‘code’ as output because we left empty for the starting index ,so by default it starts from 0 and ending index is 4
here the ending index is empty and the starting index is 4 ,so we got the above output
here,in the above example we provided an iteration number as 2,so this string will be divided for every 2nd index number ,calculated from the give initial index value,so the output was ‘oekl’