Check key exists in dictionary dict: if key in dict:
dict
if key in dict:
How to iterate: a good tutorial.
Trimming:
s = s.strip()s = s.lstrip()s = s.rstrip()
Replace:
s = s.replace('\t', ' ')
str vs repr: https://www.geeksforgeeks.org/str-vs-repr-in-python/, https://stackoverflow.com/questions/1436703/difference-between-str-and-repr.
str
repr