From C++ to Python and a little Java

From C++ to Python and a little Java

从C++到Python以及对Java的小观点

Output

Python: print f'\n'
C++: std::cout print format

Syntax

Python: indent and :
C++: {} and ;

Java

Java: All are classes. Main method in main's class. Total object-oriented.
C++: main method is just a method.

C++ like Python (Typethon)

def c(a : int, b: int) -> int:
  print(a)
posted @ 2023-02-20 15:49  千心  阅读(49)  评论(0编辑  收藏  举报