items() is the method used for python dictionaries to return iterable holding tuples for each dictionary keys and their corresponding value .
In Python, you can unpack lists and tuples into variables using the method you showed.
eg:.
item1, item2 = [1,2]
Therefore, if self.myList is a dict , method and config will refer to key and value in each tuple for this iteration, respectively.
If self.myList not a dict , I would suggest that it either inherits from dict , or the items() method is similar (you would know better).
source share