In computer science, sequences of characters are referred to as strings. Strings can be any length and can include any character such as:
- Whitespace (spaces, tabs, new lines)
It is usually contained within a pair of
'single quotes' or
A string can be thought of as a list of characters. Like any other list, each character in a string has an index.
Here are some examples of strings:
message = "Hello, world!"username = "@sonnynomnom"old_password = "Tr0ub4dor&3"new_password = "correcthorsebatterystaple"