I want to add all strings from a list to new String with a special format in Pythonic way:
I have a List with [ ‘Module1’, ‘Module2’, ‘Module3’]
The new string variable should look like = ‘Hello, i found ‘ + ‘Module1, Module2, Module3’ + ‘ in your list’
How can i implement this?
My approuch whould be:
moduleNames = ""
for item in notFinishedModules:
moduleNames = moduleNames + item + ", "
moduleNames = moduleNames[:-2]
like = 'Hello, i found ' + moduleNames + ' in your list'
1 Answer