Python has it in a more object-oriented way ...
def print_string(self):
items = ['title', 'header', 'comment']
for item in items:
print getattr(self, item)
Where "getattr" is just a pretty protocol for calling ... self.__dict__[item]
This extends to whatever you want, including members of namespaces (like declared classes, functions, other namespaces, etc...)