Удалить 'def/main.py'

This commit is contained in:
def 2022-09-12 09:59:38 +03:00
parent a33357249e
commit f95885c981

View file

@ -1,29 +0,0 @@
unique = []
text = "Вышел зайчик зайчик на крыльцо на крыльцо"
words = text.split(' ') # старый
newords = [] #
count = 0
print('\nStart words list:\n', words, '\n')
for w in words:
if w in unique and len(w) > 4:
count += 1
#print(f'Слово {w} повторяется, позиция:', words.index(w))
ind = words.index(w)
print(f'Clone: {w} / index:', ind)
#newords.insert(ind, count)
newords.append(count)
else:
unique.append(w)
newords.append(w)
print('\nNew words list:\n', newords, '\n')