I need to convert the values in dict to comma separated so I can pass it to a dataclass directly.
Code:
d = {'Exch': 'N', 'ExchType': 'C', 'Signal': 1660,
'Price': 207.75, 'date': '/Date(1626690582000)/'}
print(",".join(d.keys()))
print(",".join(d.values()))
But in my case, the keys get printed, but I get an error as below for values (Note: the values in dict are of different data types):
Exch,ExchType,Signal,Price,date
print(",".join(d.values()))
TypeError: sequence item 2: expected str instance, int found
Pardon if this query is elementary, as am quite new to Python.