Created
September 25, 2019 17:53
-
-
Save goyalrohit/c89e94f234348d3bbd150ca420529b6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# A custom function to convert string to list | |
def convertStrToList(myStr): | |
myList = list(myStr.split(" ")) | |
return myList | |
# Declaring a string | |
myStr = "String to List" | |
print(convertStrToList(myStr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment