Skip to content

Instantly share code, notes, and snippets.

@goyalrohit
Created September 25, 2019 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goyalrohit/ae7079715f328de0a7ccd468f60a91f5 to your computer and use it in GitHub Desktop.
Save goyalrohit/ae7079715f328de0a7ccd468f60a91f5 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# A custom function to convert list to string
def convertListToString(listStr):
# Declaring the string to store output
strOutput = " "
# return string using join() function
return (strOutput.join(listStr))
# Declaring list which five elements
listStr = ['List', 'to', 'String', 'using’,'join']
print(convertListToString(listStr))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment