how to convert dict object to string in python