The code is :
class Ostream:
def lshift(self, other):
print(other, end=’ ')
return self
cout=Ostream( )
now input is cout<< “Hello” << “World”
In video it is explained that as return is self(return self) in the code so first of all cout<<“Hello” is executed and then cout<<“World” is left, which is further executed.
I didn’t understood it at all, please explain the concept.