Aug-02-2020, 01:00 PM
I have the following code which I have inherited it from someone else.
Thanks a lot, in advance
vocab_filename = 'vocab.txt' vocab = load_doc(vocab_filename) vocab = vocab.split() vocab = set(vocab)I know in the steps above: document gets loaded into the memory
(vocab = load_doc(vocab_filename), split into words
vocab = vocab.split()but I do not follow what this last line is actually doing;
vocab = set(vocab)Can someone help me understand what the above line does?
Thanks a lot, in advance