print(f"Exception: {type(exception).__name__}\nException message: {exception}"). The f at the beginning signifies that it is an f-string , which just allows you to put the expression in the curly braces instead of using .format() . More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.