Савелий ЧучумаевУченик (131)
1 месяц назад
Traceback (most recent call last):
File "C:\Users\User\PycharmProjects\pythonProject\.venv\питон.py", line 11, in <module>
print(*harmfully(*data, letters='Ap'), sep='\n')
File "C:\Users\User\PycharmProjects\pythonProject\.venv\питон.py", line 5, in harmfully
if (let not in iterait or let_big not in iterait and len(iterait) % len(letters) == 0 and
TypeError: 'in <string>' requires string as left operand, not list
let = letters.split()
let_big = letters.upper().split()
for iterait in data:
if (let not in iterait or let_big not in iterait and len(iterait) % len(letters) == 0 and
iterait[0].upper() +iterait[1:].lower() != iterait):
data.remove(iterait)
data = ["And in the evenings", "people sat on their porch", "talking to each other if they wanted to"]
print(*harmfully(*data, letters='Ap'), sep='\n')