Basic Python Programming: for loops and reading files

Python string we need to put a backslash before each of them. For example: filename = 'C:\\AI\\python\\sample.txt' Writing all these backslashes can become tedious, so in most cases, you can use a shorthand provided by Python. Put the single character ‘r’ (for ‘ raw string’) at the front of your string (with no space): ................
................