Python Forum
Loop thru textfile, change 3 variables for every line - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Loop thru textfile, change 3 variables for every line (/thread-848.html)

Pages: 1 2


RE: Loop thru textfile, change 3 variables for every line - herbertioz - Nov-10-2016

Yes, thats right. I found out, but thanks anyway:)


RE: Loop thru textfile, change 3 variables for every line - Larz60+ - Nov-10-2016

Think as subnet as a bucket
You can do one of several things

1. Fill the bucket if it's empty: subnet=value ergo subnet='12345' - string wiyh value 12345
2. Replace current contents same as 1, old value is replaced
3. empty the bucket (example for a string) subnet='' (which is actually the same as 2, with specific value)
4. del subnet - delete subnet. This is rarely needed as garbage collection will take care of it for you.