objectorientedprogramming

  1. 3verlaster

    cout << in Python

    cout in Python. def ifst(i, o): return isinstance(i, o) def endl(): print() class Cout: def __lshift__(self, s): if ifst(s, str) and not s.startswith("<__main"): print(s, end="") return self cout = Cout()