x = []
with open(filechoice) as fileobj:
for word in fileobj:
for ch in word:
f = ord(ch)
x = x.append(ord(ch))
But it returns this error:
"AttributeError: 'NoneType' object has no attribute 'append'"
How can I fix this error?