Reputation: 21
What command in python can be used to make the string ST = “WORK,IS,DONE” a list [“WORK”,”IS”,”DONE”]?
I am trying this but its not working
ST = txt.split(",")
print(ST)
Upvotes: 0
Views: 31
Reputation: 84
Looks like you have the string defined under ST and not txt, which appears to be the issue.
st = "WORK,IS,DONE"
st = st.split(sep=",")
print(st)
Upvotes: 1