I am new to python. Here my target is to put data into a file in zip. Following is the code I have written, in which I am write data to a unzipped\_file, then writing unzipped\_file in zipped\_file.zip and then removing unzipped file.

```
import os
import zipfile

##Some code above.............
for some_data in big_data:
    with open('unzipped_file', 'a+') as unzipped_f:
        unzipped_f.write(some_data)

##Some code in between...........

with zipfile.ZipFile('zipped_file.zip', 'w') as zipped_f:
    zipped_f.write("unzipped_file")

os.remove("unzipped_file")

```

Instead of creating an intermediate unzipped\_file. Can I directly write my data in zipped\_file in one step.