python : get list all *.txt files in a directory
<p>i'm beginner in python language</p>

<p>how to get list all <code>.txt</code> file in a directory in python language ? </p>

<p>for example get list file :</p>

<pre><code>['1.txt','2.txt','3.txt','4.txt','5.txt','6.txt']
</code></pre>