from wordcloud import WordCloud Z=[] sonad=[] sonakogused={} liide="puu2_" 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]) for rida in open("sonakogused.txt", encoding="utf-8"): m=rida.strip().split(" ") try: sonakogused[m[0]]=int(m[1]) except: print(m) def uuriPuu(indeks, tase=0, vana=0): vastus=[] if indeks=len(sonad):vastus.append(rida[koht]) # if len(vastus.split())>50: if 1==1: fsisu="" fsisu+="tagasi
\n" fsisu+="
\n" #fsisu+="  
\n" for v in v1: fsisu+="      " fsisu+="
\n" #fsisu+="  
" for v in v2: fsisu+="      " fsisu+="" f=open("pilved5/"+liide+str(indeks)+".html", "w", encoding="utf-8") print(fsisu, file=f); f.close() return vastus uuriPuu(len(sonad)+len(Z)-1, 0, len(sonad)+len(Z)-1)