I am working on a network traffic monitor project in Python. Not that familiar with Python, so I am seeking help here.
In short, I am checking both in and out traff
The code you've shown doesn't make a great deal of sense. Here's what it does:
Iterate through the sequence 'in', 'out', assigning each of those two strings in turn to the variable iter (masking the built-in function iter() in the process) on its two passes through the loop.
Completely ignore the value of iter inside the loop.
Assign the result of myhttp() to the variable netdata on each pass through the loop.
Completely ignore the value of netdata, and instead attempt to print the undefined variable data on each pass through the loop.
It's possible, given the nested list you describe, that you want something like this:
for t, f in myhttp():
print t
print f
# ... or whatever you want to do with those values.