support variable length data in python

Added support for variable length data in generated python