
The map () function will accept 2 arguments str () function that will convert the given data type into the string data type.

import zipfile from cStringIO import StringIO f StringIO () z zipfile.ZipFile (f, 'w', zipfile.ZIPDEFLATED) z.writestr ('name', 'somebytestocompress') z.close () outputstring f. The map function can be used in 2 cases to convert a list to a string.

IZIP PYTHON TO STRING ZIP
Python Dictionaries Access Items Change Items Add Items Remove Items Loop Dictionaries Copy Dictionaries Nested Dictionaries Dictionary Methods Dictionary Exercise Python If.Else Python While Loops Python For Loops Python Functions Python Lambda Python Arrays Python Classes/Objects Python Inheritance Python Iterators Python Scope Python Modules Python Dates Python Math Python JSON Python RegEx Python PIP Python Try. Here's an example that creates a zip and adds one file to it - all in-memory, without physical files.
