from wordcloud import WordCloud Z=[] sonad=[] for rida in open("sonaseosed.txt", encoding="utf-8"): m=rida.strip().split(",") Z.append([int(m[1]), int(m[2]), float(m[3]), int(m[4])]) for rida in open("sonaindeksid.txt", encoding="utf-8"): sonad.append(rida.strip().split(",")[1]) leht=[] def uuriPuu(indeks, tase=0): if indeks50: leht.append((4*tase*" ")+"
") #WordCloud().generate(vastus).to_file("pilved4/"+str(indeks)+".png") # print(tase*" "+vastus) return vastus uuriPuu(len(sonad)+len(Z)-1) print(""+"\n".join(leht)+"")