class Storage: def __init__(self, item): self.contents = item def getContents(self): return self.contents def setContents(self,newitem): self.contents = newitem def swapWith(self, otherStorage): myitem = self.contents self.setContents(otherStorage.getContents()) otherStorage.setContents(myitem)