11-20-2024, 02:23 PM
Yumda says:
so, if I understand correctly the ldlist is like creating a text file say --- vocablist, and within that file it contain the data or words in this case, am I correct to visualise like this? The trouble for me is that if I can not understand the logic I just could not utilise it. And the indices would be the order of the words in the file...
Am I correct by thinking it like this?
Yumda,
Yes you are correct. It is just lines of text with the indexes in front of them. Here is a code snippet to see how it works.
filepath="c:\temp\myfolder\myfile.txt"
name="myList"
LDList.Add(name,"Dog")
LDList.Add(name,"cat")
LDList.Add(name,"Rat")
LDList.Print(name)
LDList.write(name,filepath,"False")
'Then look in the filepath and you will see your list as a .txt file
I hope this helps!
JR
so, if I understand correctly the ldlist is like creating a text file say --- vocablist, and within that file it contain the data or words in this case, am I correct to visualise like this? The trouble for me is that if I can not understand the logic I just could not utilise it. And the indices would be the order of the words in the file...
Am I correct by thinking it like this?
Yumda,
Yes you are correct. It is just lines of text with the indexes in front of them. Here is a code snippet to see how it works.
filepath="c:\temp\myfolder\myfile.txt"
name="myList"
LDList.Add(name,"Dog")
LDList.Add(name,"cat")
LDList.Add(name,"Rat")
LDList.Print(name)
LDList.write(name,filepath,"False")
'Then look in the filepath and you will see your list as a .txt file
I hope this helps!
JR