DEV Community

Cover image for c++ vs python
221910303029
221910303029

Posted on

c++ vs python

              C++
Enter fullscreen mode Exit fullscreen mode

C++ was developed by Bjarne Stroustrup in 1979.

C++ code is less complex than C but more complex in contrast to python.

C++ is a compiled language.

C++ provides new operator for memory allocation and delete operator for memory de-allocation.

lower time complexity

PYTHON
Python was created by Guido van Rossum, and released in 1991.

Easier to write code.Python is an interpreted language.

Python’s memory allocation and deallocation method is automatic.

higher time complexity

c++ code:
//c++
header file(#include)
using namespace std;

int main() {
// your code goes here
cout << "Hello World";
return 0;
}
python code:

python

print("hello world")

Top comments (0)