support variable length data in python