I'm trying to put file's contents in a dictionary. Even though file itself remains unchanged, the dictionary I get in the end is always different.
with open('sorted.txt') as fin:
lines = fin.readlines()
words = {i.split(' - ')[0]:i.split(' - ')[1] for i in lines}
for i in words.keys():
print(i, '-', words[i])
One time it's something like this:
bawl - реветь, вопить
by the by - кстати, к слову (cм. by the way)
staple - cкоба, основная черта, главная часть
staggering - ошеломляющий, неустойчивый
trample - давить, топтать, подавлять
enthrall - очаровывать, увлекать, захватывать
elusive - неуловимый
lay off - увольнять
at the drop of a hat - Fig. immediately; instantly; on the slightest signal or urging.
feasible - осуществимый, выполнимый
wince - вздрогнуть, поморщиться
wax poetic - Fig. to speak poetically. I hope you will pardon me if I wax poetic for a moment when I say that your lovely hands drift across the piano keys like swans on a lake.
supple - мягкий, податливый
willy-nilly - spontaneous
itsy-bitsy - незначительный
ramble - прогуливаться для удовольствия, бродить без цели
get off on sth - тащиться по чему-л.
bring out - выявлять, обнаруживать
apples and oranges - сравнение несравнимых вещей или понятий
backlash - агрессивная реакция
eat sb out of house and home - есть чужую еду
meek - кроткий, смиренный
chuckle - посмеиваться, хихикать
gibberish - неразборчивая речь, чушь
evocative of - вызывающий воспоминания о чем-л.
supplication - мольба
fall apart (inf.) - расчувствоваться, испытывать эмоциональные проблемы
fumble - шарить, нащупывать
on an ad-hoc basis - as demand arises, по необходимости
plod along
stammer - запинаться
exasperate - раздражать, изводить, выводить из себя
conspicuous - бросающийся в глаза, заметный
to walk on eggshells - прилагать большие усилия, чтобы не расстроить кого-л.
go out with a bang - If someone or something goes out with a bang, they stop
existing or doing something in an exciting way.
And another exact same list but shuffled.
What am I doing wrong?