You don't have closing parenthesis for your print statements i.e. )
=> print(file_lines[first_word_index:])
If you're writing code in vscode, try using Python extension by microsoft and pylint or flake8 to give you linting errors as you write code; it'll make it a lot easier to find these sort of things.