Strings
A string is a sequence of characters enclosed in quotes.
s1 = "Hello"\ns2 = 'World'\ns3 = """Multi-line"""String Operationss = "Python"\nlen(s) # 6\ns[0] # P\ns[-1] # n\ns[1:4] # yth\ns.upper() # PYTHON\ns.lower() # python\ns.replace("P","J") # JythonString MethodsMethodDescriptionlen()Lengthupper()/lower()Case conversionstrip()Remove spacessplit()Split to listfind()Find substringcount()Count occurrencesstartswith()/endswith()Check start/end