convert dictionary to string in python code example
Example 1: convert dict to string python
my_dict = {"Hello" : True, "World" : False}
print(str(my_dict))
Example 2: python dict keys to string
myList = ['Tom', 'Lisa', 'Chris', 'Joe']
separator = ' and ' # note the spaces around
s = separator.join(myList)
print(s)
## outputs:
## Tom and Lisa and Chris and Joe