class MyClass(object):

    def __init__(self):
        self._myList = [len(modList)]

def appendLenToModList(self):
    modList.append(len(self._myList))
Python: Making a class variable static even when a module is imported in different ways