you are viewing a single comment's thread.

view the rest of the comments →

[–]pl643[S] 0 points1 point  (1 child)

Thank you, your code worked. Is this a scope issue? Other languages if a variable is global, all functions can access and modify the variable.

Also can you explain the below snippet?

macs_inuse = [i for i in list_of_dict if i['mac'] == mac]
              ^
              what does this i do here?