|
1 | 1 | #Python Syntax Errors: Common Mistakes and How to Fix Them
|
2 | 2 |
|
| 3 | +-[How to read Python syntax errors](#how-to-read-python-syntax-errors) |
| 4 | +-[How to fix syntax errors](#how-to-fix-syntax-errors) |
| 5 | +*[Misplaced, missing, or mismatched punctuation](#misplaced-missing-or-mismatched-punctuation) |
| 6 | +*[Misspelled, misplaced, or missing Python keywords](#misspelled-misplaced-or-missing-python-keywords) |
| 7 | +*[Illegal characters in variable names](#illegal-characters-in-variable-names) |
| 8 | +*[Incorrect indentation](#incorrect-indentation) |
| 9 | +*[Incorrect use of the assignment operator (=)](#incorrect-use-of-the-assignment-operator) |
| 10 | + |
| 11 | + |
3 | 12 | This article examines how to read and fix Python syntax errors with the
|
4 | 13 | help of practical web scraping examples.
|
5 | 14 |
|
@@ -396,7 +405,7 @@ harder to read. Using this method can bring about unnecessary syntax
|
396 | 405 | errors when they can be avoided by sticking to either spacesor tabs
|
397 | 406 | throughout the code.
|
398 | 407 |
|
399 |
| -### Incorrect use of the assignment operator (=) |
| 408 | +### Incorrect use of the assignment operator |
400 | 409 |
|
401 | 410 | 1. Ensure you aren’t assigning values to functionsor literalswith the assignment operator`=`. You can only assign values to variables. Here’s an overview of some examples:
|
402 | 411 |
|
|