Python Forum
Loop thru textfile, change 3 variables for every line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loop thru textfile, change 3 variables for every line
#11
Yes, thats right. I found out, but thanks anyway:)
Reply
#12
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run shell command, capture the output, then write it into textfile? tatahuft 4 854 Dec-20-2024, 02:13 PM
Last Post: Axel_Erfurt
  textfile to customtkinter combobox janeik 6 3,926 Aug-31-2023, 02:50 AM
Last Post: deanhystad
  Trying to loop through code to plot seaborn line plots across multiple subplots eyavuz21 0 2,749 Dec-05-2022, 10:46 AM
Last Post: eyavuz21
  Creating a loop with dynamic variables instead of hardcoded values FugaziRocks 3 2,412 Jul-27-2022, 08:50 PM
Last Post: rob101
  WHILE Loop - constant variables NOT working with user input boundaries C0D3R 4 2,460 Apr-05-2022, 06:18 AM
Last Post: C0D3R
  Skipping line in text without Restarting Loop IdMineThat 4 2,688 Apr-05-2022, 04:23 AM
Last Post: deanhystad
  How to prevent python from going to new line in for loop? idknuttin 3 7,325 Feb-11-2022, 05:40 AM
Last Post: deanhystad
  How to make for loop display on 1 Line Extra 3 2,190 Jan-12-2022, 09:29 PM
Last Post: Extra
  how to use 3 variables python loop evilcode1 2 2,367 Nov-12-2021, 11:43 AM
Last Post: jamesaarr
  Change the varaible in For Loop quest 2 2,369 Aug-13-2021, 03:35 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020