I'm trying to zip a file in python, my code is:
import zipfile
f = zipfile.ZipFile('/home/tom/Desktop/test.csv.zip','w',zipfile.ZIP_DEFLATED)
f.write('/home/tom/Desktop/test.csv')
f.close()
It's working well, but inside my zip file I'm having the full path: /home/tom/Desktop/test.csv
How can I just get test.csv inside the zip file?