Convert list of dicts to string

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2011-03-09T23:46:56Z Indexed on 2011/03/10 0:10 UTC
Read the original article Hit count: 101

Filed under:
|
|
|

I'm very new to Python, so forgive me if this is easier than it seems to me.

I'm being presented with a list of dicts as follows:

[{'directMember': 'true', 'memberType': 'User', 'memberId': '[email protected]'}, {'directMember': 'true', 'memberType': 'User', 'memberId': '[email protected]'}, {'directMember': 'true', 'memberType': 'User', 'memberId': '[email protected]'}]

I would like to generate a simple string of memberIds, such as

[email protected], [email protected], [email protected]

but every method of converting a list to a string that I have tried fails because dicts are involved.

Any advice?

© Stack Overflow or respective owner

Related posts about python

Related posts about string