[python] fix tuple creation