Type Checking
Characters of String
Main Characteristics of Python strings
1. Immutable: content cannot be changed.
2. Case Sensitivity: 'Hello' and 'hello' are considered different strings.
3. Enclosed in Quotes: single (' ') or double (" ") quotes.
4. Indexing: string can be accessed using its index.
5. Slicing: string can be sliced.
6. Concatenation: using '+' operator to combine two or more strings.
7. Sequence Type: Sequence operations such as indexing, slicing & iteration.
8. Escape Sequences: such as '\n' for a new line, '\t' for a tab, '\' for a backslash.
9. Raw Strings: Python supports raw strings (preceded by 'r' or 'R')
10. Comparison: Strings can be compared.
11. Length: The len() function can be used to determine the length of a string.
#python #pythoncode #coding #pythonprogramming #interviewtips