Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by www.techbeamers.com #
 
PREVIOUS NEXT
Tagged: #python #dict #keys #string
ADD COMMENT
Topic
Name
1+4 =