Skip to content

Instantly share code, notes, and snippets.

@goyalrohit
Created September 25, 2019 14:27
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/41763bf2c6a56ef5b91509ef68cbfd14 to your computer and use it in GitHub Desktop.
Save goyalrohit/41763bf2c6a56ef5b91509ef68cbfd14 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# Declaring list which contains both string and integer elements
listStrInt = ['List', 'to', 'String', 2, 0, 1, 9]
# convert list to string using join and map functions
listToStr = ' '.join(map(str, listStrInt))
print(listToStr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment