sorry maybe it is a very easy question but i can't find it. i have a text file and it has a data
[3, 1, 1, 1, 3, 3, 3, 3]
[1, 1, 1, 1, 3, 3, 3, 3]
in it.
I want to read this file, add all this data in one array. after this i want to check it with
with open("data.txt", "r") as fd:
lines = fd.read().splitlines()
print(lines)
games = [3, 1, 1, 1, 3, 3, 3, 3]
print(type(lines))
if lines in games:
print("OK")
else:
print("NO")
I can see lines is a list, games is a list, but i can't find it in lines list.
May you help me pls