Importing a list
Posted: 17 Jun 2021 19:20
I would like to be able to pull a long list of words from a file into a list. I know how to do that if each word is a fact, and I think I could do it by making a single fact with the long list of words delimited as a list in that fact, but is there a command that would allow a file with delimited words to be read directly into a list?
Input would be a text file
word1,word2,word3 etc
or
word1
word2
word3
etc.
End product would be
So, how can I read that file into a list variable?
Input would be a text file
word1,word2,word3 etc
or
word1
word2
word3
etc.
End product would be
Code: Select all
Wordlist = [Word1,Word2,Word3...]