<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Random sequences in Python</title>
	<atom:link href="http://python.genedrift.org/2007/04/02/random-sequences-in-python/feed/" rel="self" type="application/rss+xml" />
	<link>http://python.genedrift.org/2007/04/02/random-sequences-in-python/</link>
	<description>a step-by-step guide to create Python applications in bioinformatics</description>
	<lastBuildDate>Sun, 02 May 2010 04:24:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
	<item>
		<title>By: nghiavt</title>
		<link>http://python.genedrift.org/2007/04/02/random-sequences-in-python/comment-page-1/#comment-14248</link>
		<dc:creator>nghiavt</dc:creator>
		<pubDate>Mon, 09 Jun 2008 02:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://python.genedrift.org/2007/04/02/random-sequences-in-python/#comment-14248</guid>
		<description>Here is code that how we random a list:

from random import randrange
lstSeed=[&#039;a&#039;,&#039;b&#039;,&#039;c&#039;,&#039;d&#039;,&#039;e&#039;]
results=[]
while lstSeed:
    pos = randrange( len(lstSeed) )
    results.append(lstSeed[pos])
    del lstSeed[pos]
print lstSeed

return results</description>
		<content:encoded><![CDATA[<p>Here is code that how we random a list:</p>
<p>from random import randrange<br />
lstSeed=['a','b','c','d','e']<br />
results=[]<br />
while lstSeed:<br />
    pos = randrange( len(lstSeed) )<br />
    results.append(lstSeed[pos])<br />
    del lstSeed[pos]<br />
print lstSeed</p>
<p>return results</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nico Cesar</title>
		<link>http://python.genedrift.org/2007/04/02/random-sequences-in-python/comment-page-1/#comment-11645</link>
		<dc:creator>Nico Cesar</dc:creator>
		<pubDate>Sun, 20 Apr 2008 14:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://python.genedrift.org/2007/04/02/random-sequences-in-python/#comment-11645</guid>
		<description>Shorter version using list comprehensions

---
#!/usr/bin/env python

import random,sys

length = int(sys.argv[1])

print &quot;&quot;.join([random.choice(&#039;ACGT&#039;) for x in range(lenght)])
---

look at this I just got a new snake subspecie!  arrrghh...</description>
		<content:encoded><![CDATA[<p>Shorter version using list comprehensions</p>
<p>&#8212;<br />
#!/usr/bin/env python</p>
<p>import random,sys</p>
<p>length = int(sys.argv[1])</p>
<p>print &#8220;&#8221;.join([random.choice('ACGT') for x in range(lenght)])<br />
&#8212;</p>
<p>look at this I just got a new snake subspecie!  arrrghh&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nuin</title>
		<link>http://python.genedrift.org/2007/04/02/random-sequences-in-python/comment-page-1/#comment-4531</link>
		<dc:creator>nuin</dc:creator>
		<pubDate>Wed, 24 Oct 2007 16:43:28 +0000</pubDate>
		<guid isPermaLink="false">http://python.genedrift.org/2007/04/02/random-sequences-in-python/#comment-4531</guid>
		<description>Hi Dilmurat,

In fact it is not necessary to convert from string to list. I just used the conversion to show that random.choice() can use either. Sometimes your elements will be in a string, sometimes in a list.

Paulo</description>
		<content:encoded><![CDATA[<p>Hi Dilmurat,</p>
<p>In fact it is not necessary to convert from string to list. I just used the conversion to show that random.choice() can use either. Sometimes your elements will be in a string, sometimes in a list.</p>
<p>Paulo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dilmurat</title>
		<link>http://python.genedrift.org/2007/04/02/random-sequences-in-python/comment-page-1/#comment-4526</link>
		<dc:creator>Dilmurat</dc:creator>
		<pubDate>Wed, 24 Oct 2007 15:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://python.genedrift.org/2007/04/02/random-sequences-in-python/#comment-4526</guid>
		<description>Hi Paulo:

Thanks for the introduction of &#039;random&#039; module, that I&#039;m not familiar with.

But I have a question about &#039;random.choice()&#039; function. Is not the random.choice() equivalent with random.choice()? So is it necessary for converting string to list in the above code?

Thanks!
Dilmurat</description>
		<content:encoded><![CDATA[<p>Hi Paulo:</p>
<p>Thanks for the introduction of &#8216;random&#8217; module, that I&#8217;m not familiar with.</p>
<p>But I have a question about &#8216;random.choice()&#8217; function. Is not the random.choice() equivalent with random.choice()? So is it necessary for converting string to list in the above code?</p>
<p>Thanks!<br />
Dilmurat</p>
]]></content:encoded>
	</item>
</channel>
</rss>

