Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #если краска, то пропускаем определение пола
- if item[get_name_sex] != "":
- product1 = item[get_name_sex].split()
- sex = "U"
- i = 0
- #ищем признак пола
- for word in product1
- if word == "М":
- sex = "M"
- i = it_num
- elif word == "Ж":
- sex = "W"
- i = it_num
- elif word == "ДЕТ":
- sex = "K"
- i = it_num
- product = ""
- # если найден пол, то склеиваем все, короме элемента с полом
- if sex != "U":
- for word in product1
- if it_num !=i:
- product = product+word+" "
- else
- #если ничего не изменилось, то оставляем полностью строку
- product = item[get_name_sex]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement