<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2900.2722" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>nakonec jsem pouzil napad Petra s tou
mnozinou.</FONT></DIV>
<DIV>====================================================<BR>fin =
file('vstup.txt')<BR>fout = file('vystup.txt', 'w')<BR><BR>processed =
set() # prazdna mnozina jiz zpracovanych <BR><BR>for
line in fin:<BR> if line[0] not in '*
\t':<BR> # Novy nazev souboru,
zaciname sbirat dalsi sekci.<BR>
fout.write(line)<BR>
processed.clear()<BR><BR>
else:<BR> # Sbirame unikatni radky
sekce.<BR> if line not in
processed:<BR>
processed.add(line)<BR>
fout.write(line)<BR><BR>fin.close()<BR>fout.close()<BR>====================================================<BR></DIV>
<DIV><FONT face=Arial size=2>ale mam jeste jeden dotaz... co kdyz chci vypisovat
do souboru "vystup.txt" jen urcite KODy, napr. ktere zacinaji na AAA (to je ten
3 znakovy KOD na zacatku radku), jak potom upravit ten "for"? </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>diky moc</FONT></DIV></BODY></HTML>