I have this as my input
content = ‘abc.zip’\n
I want to take out abc out of it . How do I do it using regex in python ?
Edit :
No this is not a homework question . I am trying to automate something and I am stuck at a certain point so that I can make the automate generic to any zip file I have .
os.system('python unzip.py -z data/ABC.zip -o data/')
After I take in the zip file , I unzip it .
I am planning to make it generic , by getting the filename from the directory the zip file was put in and then provide the file name to the upper stated syntax to unzip it
If you’re trying to break up parts of a path, you may find the os.path module to be useful. It has nice abstractions with clear semantics that are easy to use.