with open("index.html", encoding="UTF-8") as file:
template = file.read()
sp = len(string)//3
p1 = string[:sp]
p2 = string[sp:2*sp]
p3 = string[2*sp:]
string = "Янкав, Сер, Заводск"
a = string.split(', ')
print("Это через цикл:")
for i in a:
print(i)
print('\nЭто в ручную:')
print(a[0])
print(a[1])
print(a[2])