Удалить 'def/main.py'
This commit is contained in:
parent
a33357249e
commit
f95885c981
29
def/main.py
29
def/main.py
|
@ -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')
|
Reference in a new issue