Tips:<br><br>1.<br>range can be stepped down in reverse order<br>ex -&gt;<br>&gt;&gt;&gt; range(10, 1, -2)<br>[10, 8, 6, 4, 2]<br><br>2.<br>you can directly get chars of string.<br>ex -&gt;<br>&gt;&gt;&gt; [i for i in &#39;foobar&#39;]<br>

[&#39;f&#39;, &#39;o&#39;, &#39;o&#39;, &#39;b&#39;, &#39;a&#39;, &#39;r&#39;]<br>also<br>&gt;&gt;&gt; 2 * &#39;f&#39;<br>&#39;ff&#39;<br><br><br><div class="gmail_quote">On Sun, Jan 31, 2010 at 3:56 AM, Shashwat Anand <span dir="ltr">&lt;<a href="mailto:anand.shashwat@gmail.com">anand.shashwat@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">seems like homework ;)<br>Can you paste your approach here ?<br><br><div class="gmail_quote">

<div><div></div><div class="h5">On Sun, Jan 31, 2010 at 3:03 AM, invincible patriot <span dir="ltr">&lt;<a href="mailto:invincible_patriot@hotmail.com" target="_blank">invincible_patriot@hotmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">



<div>
<br>hi<div>i am stuck in few tasks can some one help me in that</div><div>here are first few tasks</div><div><br></div><div>1</div><div>how can i print the following series, using a loop</div><div><div>15</div><div>13</div>


<div>11</div><div>...</div><div>3</div><div>1</div><div>-1</div><div>========</div><div>2</div><div><div>Write a small Python program that generates the list of all pairs of characters c and</div><div>its doubling 2   c, where c moves through all the letters of the string &quot;foobar&quot; and prints it out.</div>


<div>The result will look like:</div><div>[(’f’, ’ff’), (’o’, ’oo’), (’o’, ’oo’), (’b’, ’bb’), (’a’, ’aa’), (’r’, ’rr’)]</div><div><br></div><div>please help me out in these two tasks</div></div><div><br></div></div><div>


                                               <br><hr>Hotmail: Trusted email with powerful SPAM protection. <a href="http://clk.atdmt.com/GBL/go/196390707/direct/01/" target="_blank">Sign up now.</a></div></div>
<br></div></div>_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br></blockquote></div><br>
</blockquote></div><br>