-3
 ratings_list = [i.strip().split("::") for i in open(encoding="utf8", 'ratings.csv', 'r').readlines()]

Input In [4]
    ratings_list = [i.strip().split("::") for i in open(encoding="utf8", 'ratings.csv', 'r').readlines()]
                                                                                           ^
SyntaxError: positional argument follows keyword argument
mkrieger1
  • 19,194
  • 5
  • 54
  • 65

1 Answers1

0

Try

open('output.txt', 'r', encoding='utf-8')

keyword-arguments like encoding='utf-8' (encoding is the keyword) must not be succeeded by positional arguments (which are assigned in the function call by the position in the parameter list).

MatthiasL
  • 56
  • 5