raw = []
ru = []

with open("genres_tags.txt", "r") as rawF:
    raw = rawF.read().split("\n")
with open("genres_ru.txt", "r") as ruF:
    for ruTag in ruF.readlines():
        tag = ruTag.split(" - ")
        ru.append({
            "tag": tag[0],
            "name": tag[1].replace("\n", "")
        })
with open("genres_coll.txt", "a") as newF:
    for tag in ru:
        if tag["tag"] in raw:
            raw.remove(tag["tag"])
        newF.write(tag["tag"] + ":" + tag["name"]+ "\n")
    for tag in raw:
        newF.write(tag + ":\n")

# print(raw)