Use cout << 'Hello, World! << Endl in Python

xiaoxiao2021-03-06  72

Import sys

Class Ostream: DEF __INIT __ (Self, file): self.file = file

Def __lshift __ (self): self.file.write (STR (OBJ)); Return Self

Cout = ostream (sys.stdout) CERR = ostream (sys.stderr) endl = '/ n'

AGE = 23name = 'albert'

Cout << 'Hello, World!' << Endl

Cout << 'name:' << name << Endl << 'agn:' << age << Endl

转载请注明原文地址:https://www.9cbs.com/read-120475.html

New Post(0)