import collectionsimport pickleFred = collections.namedtuple("Fred", ("a", "b"))y = Fred(1,2)z = Fred(3,4)s = pickle.dumps([Fred,y])print(s)
Standard input is empty
b'\x80\x03]q\x00(c__main__\nFred\nq\x01h\x01K\x01K\x02\x86q\x02\x81q\x03e.'
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!