new_list for xy in zip(self mylistother mylist)return sumlist(new_listdef __repr__(self)return str(self mylistaa sumlist([ , ]bb sumlist([ ]cc aa bb aa __add__(bbprint(ccshould gives us list ([ ]output [ but there are many methods which are internally managed by others magic methods below are some of them'abcin var var __contains__('abc'var ='abcvar __eq__('abc'var[ var __getitem__( var[ : var __getslice__( len(varvar __len__(print(varvar __repr__(inheriting from built-in types classes can also inherit from built-in types this means inherits from any built-in and take advantage of all the functionality found there in below example we are inheriting from dictionary but then we are implementing one of its method __setitem__ this (setitemis invoked when we set key and value in the dictionary as this is magic methodthis will be called implicitly