snakesNbronies
snakesNbronies

Reputation: 3910

string manipulation - stringing '&' between a list of args

I have a list of args

args = ['abc', 'def', 'ghi'... ... ... (long list)]

I would like make a string called 'clipboard' where:

clipboard = 'abc&def&ghi&... ... ... (long list)'

Pointers would be appreciated.

Upvotes: 2

Views: 125

Answers (1)

katy lavallee
katy lavallee

Reputation: 2771

clipboard = '&'.join(args)

Upvotes: 10

Related Questions