I am having very basic query that I want to achieve something like this:
<some work>
for f in glob('a1*.txt*'):
<some work>
I am having a1.txt
, a2.txt
, a3.txt
, ......,a10.txt
, a11.txt
, ....,a100.txt
.
I want to process file like a1.txt
,a2.txt
, a3.txt
,...
When I am selecting files in the for
loop, it does not appear in a sequence like a1.txt, a2.txt, a3.txt
it is appearing like a1.txt, a10.txt ...
etc.
How do I resolve this?