In my text file i have Strings data i am try to unpack them using Split() but unfortunately giving me error as "ValueError: not enough values to unpack (expected 2, got 1)" Plz help to solve me if you know
with open('Documents\\emotion.txt', 'r') as file:
for line in file:
clear_line = line.replace("\n", '').replace(",", '').replace("'", '').strip()
print(clear_line)
word,emotion = clear_line.split(':')
I have this type of data
victimized: cheated
accused: cheated
acquitted: singled out
adorable: loved
adored: loved
affected: attracted
afflicted: sad
aghast: fearful
agog: attracted
agonized: sad
alarmed: fearful
amused: happy
angry: angry
anguished: sad
animated: happy
annoyed: angry
anxious: attracted
apathetic: bored