<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=468091&amp;view=findpost&amp;p=3930366</guid>
        <pubDate>Tue, 21 Oct 2025 08:44:15 +0000</pubDate>
        <title>Не печатать пустую строку</title>
        <link>https://forum.sources.ru/index.php?showtopic=468091&amp;view=findpost&amp;p=3930366</link>
        <description><![CDATA[Alexei: Строку удалил , сделал <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">if &nbsp;str_ == &quot;\n&quot;:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;else:</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
Но про шаблон все еще интересно&#33;]]></description>
        <author>Alexei</author>
        <category>Python</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=468091&amp;view=findpost&amp;p=3930351</guid>
        <pubDate>Tue, 21 Oct 2025 06:46:52 +0000</pubDate>
        <title>Не печатать пустую строку</title>
        <link>https://forum.sources.ru/index.php?showtopic=468091&amp;view=findpost&amp;p=3930351</link>
        <description><![CDATA[Alexei: Чтобы я не делал , оно упорно печатает пустую строку и в ней 0<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">f_in = open(&#39;encode.txt&#39;, &#39;rt&#39;)</div><div class="code_line">f_out = open(&#39;encode.h&#39;, &#39;wt&#39;)</div><div class="code_line">cnt = 0</div><div class="code_line">cnt_str = 0</div><div class="code_line">fr = &quot;0x&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">while True: &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;str_ = f_in.readline() &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;#if not str_ == &quot; &quot;:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;cnt = str_.count (fr)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if fr != 0 :</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str_0 = &quot;[&quot; + (str(cnt_str)) + &quot; , &quot; + &nbsp;(str(cnt))+ &quot;]&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; f_out.write (str_0 + str_)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cnt_str += 1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if not str_:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break</div><div class="code_line">##f_out.write(&quot;};&quot;)</div><div class="code_line">f_in.close()</div><div class="code_line">f_out.close()</div></ol></div></div></div></div><br>
<br>
И еще есть ли какой-нибудь шаблон на один символ или два ?<br>
Спасибо.]]></description>
        <author>Alexei</author>
        <category>Python</category>
      </item>
	
      </channel>
      </rss>
	