I have a dict that looks something like this:
d = {'a': 'b', 'c': 'd'}
Now, when I make a str out of it using str(d) i get
>> "{'a': 'b', 'c': 'd'}"
but I need it to look like this:
>> "a=b; c=d; "
I created this piece of code that does this:
b = ''
for k, v in d.items():
b += str(k) + '=' + str(v) + '; '
Is there a way to achieve the same effect, but doing it with an inline operation or some other neater way, without using the for loop?
''.join()