Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement