I'm trying to write a code that reads the filenames of objects of the form "gal_z7.25.sae" and "gal_z0.02563.sae" and stores the decimal digit parts ONLY to a list.
So far I have the following:
Expand|Select|Wrap|Line Numbers
- import glob
- import sys, os
- #Open folder with files
- filelist = glob.glob("/home/clemence/Desktop/testing/*.sae")
/home/clemence/Desktop/testing/gal_z0.275.sae'
And each item in filelist contains the numbers I need. All I need is a way of ignoring the text and taking only the numbers into another list.
Please help