Skip to content

Instantly share code, notes, and snippets.

@goyalrohit
Created September 25, 2019 13:46
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/f04a787c942407151147ea3aeb88c8a6 to your computer and use it in GitHub Desktop.
Save goyalrohit/f04a787c942407151147ea3aeb88c8a6 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# A custom function to convert list to string
def converttoStr(listChar):
# Declaring the string to store output
output = ""
# traversing the list of chars
for data in listChar:
output += data
# the string output
return output
# Declaring list of characters
listChar = ['L', 'i', 's', 't', 'T', 'o', 'S', 't', 'r', 'i', 'n', 'g']
print(converttoStr(listChar))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment