Strings



examples/overview/strings.py
a = "double quote"
b = 'single quote'
c = """
multi
line
can use either single or double quotes
"""

d = f"f-string with {a} or with {b}"

e = r"\raw\string\to\keep\backslashes"


x = a + b

var[3]
var[3:7]

len(var)

ord(char)
chr(number)

var.title()
var.upper()
var.lower()
var.index(sub)
var.rindex(sub)
var.find(sub)

short in long
if short in long:
    print('in')


':'.join(list_of_strings)
some_string.split(':')