How to use 'python string concat' in Python

Every line of 'python string concat' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
126def myConcat(L):
127 '''
128 Input:
129 -L:a list of strings
130 Output:
131 -the concatenation of all the strings in L
132Be sure your procedure works for the empty list.
133 Examples:
134 >>> myConcat(['hello','world'])
135 'helloworld'
136 >>> myConcat(['what','is','up'])
137 'whatisup'
138 '''
139 current =''
140 for x in L:
141 current = current + x
142 return current

Related snippets