I am trying to build a bot which gives a random answer from CSV file. Piece of code I have problem with:
def get_data(lounaslista):
with open('C:\Users\p7l1n\Desktop\lounasbotti\lounaslista.csv', 'r') as f:
r = csv.reader(f)
data = [row for row in r]
return data
Error I'm getting:
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
I tried solutions from following post.