Python vs C

0 votes
What is the difference between Python and C++? How are these two languages different in terms of Architecture and Programming?

Which is better in what terms?

Please share your opinions.
Feb 6, 2019 in Others by Esha

4 answers to this question.

0 votes

Memory management: C++ doesn't have garbage collection, it uses raw pointers to manage and access memory. While in Python you don't have to explicitly allocate memory for new variables, and you don't have to explicitly free memory you're done with.

Language complexity: C++ is a beast of a language. Python is much simpler, which leads to faster development and less mental overhead.

Interpreted vs compiled: C++ is almost always explicitly compiled. Python is not (generally). It's common practice to develop in the interpreter in Python, which is great for rapid testing and exploration.
answered Feb 7, 2019 by Dheeraj
0 votes
Python and C++ are the programming languages used for general purpose but both Python and C++ languages differ from each other in many ways. C++ is originated from C language with multiple paradigms and provide the feature of compilation.

Python is a general purpose and one of the high-level programming languages. A variable can be used directly without its declaration while writing code in python.

In C++, a single program needs to get compiled on every operating system on which the code is to be run.

Python provides the ability to ‘write once, run anywhere’ that enables it to run on all the operating systems which have Python installed.

C++ is prone to memory leak as it does not provide garbage collection and uses pointers to a large extent.

Python has inbuilt garbage collection and dynamic memory allocation process that enables efficient memory management.

In C++, the developer needs to declare data type before using it. Therefore, it is less ambiguous regarding what the codes do, and error handling becomes easier than python.

While writing code in Python, a user doesn’t need to mention the type of data before using it, consequently making the length of the code shorter and easier to maintain. For example, in C++, a user must declare int a=5 whereas in Python a=5 is sufficient.

C++ is also called an intermediate-level programming language as it is developed using both low-level and high-level language features. C++ also supports object-oriented functionalities like the concept of classes, operator overloading, multiple inheritances, virtual functions, exception handling etc.
answered Feb 13, 2019 by rajesh
• 1,230 points
Good explanation, thank you @rk
+1 vote


  • Python has less backward compatibility whereas C++ is more compatible with the system in use.
  • Python programs result as much shorter in length in comparison to code in C++ that enables fast prototyping and results in speedier coding rate.
  • C++ is complete, based on the binary that used existing libraries to perform the coding operations.
  • Python has the flexibility while calling functions and returning their values.
  • C++ uses compiler for the compilation of the code.
  • Python when runs, uses an interpreter.
  • A wide variety of applications use C++ to be developed.
  • Python has access to the API of a wide variety of applications based on 3D.
  • Python is an easy-to-use programming language in comparison to C++.
  • Python is slower than C++.
  • Python helps in faster application development and keep introducing additional language features.
answered Mar 11, 2019 by rajesh kumar
0 votes

Well C is very old programming language which is almost outdated at majority of the applications. But it is very much important to understand c because it is said to be the foundation of any programming language. where as python is new trend at the market which provides many new specification. 

Generally it is like comparing a Black and white phone with Apple Iphone XR.  We cant say black and white phone were bad it was once so much useful but with the development in the technology we no longer use it.

Both this programming language are in same condition as the phones where python is iphone and c is black and white. 

In term of application almost all the application at present are prefer to be done using Python .

some of the advantageous features which python provides are:

  • It is easy to code
  • Interpreted Programming Language
  • Most suitable language to use in making projects for Data Science
  • It saves your time as it is very flexible
  • Python is versatile and readable
  • It is well structured which makes it perfect to use in development
  • So it is better to build some basic for C or C++ and the pursue the Course of Python.
  • Thank You
answered Apr 3, 2019 by MrBoot
• 1,190 points

Related Questions In Others

0 votes
1 answer

Avoiding memory leaks in C++

If you use smart pointers at all ...READ MORE

answered Nov 5, 2018 in Others by nirvana
• 3,150 points
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,364 views
0 votes
0 answers
0 votes
1 answer

Which is better if we compare C vs Python?

It depends on what do you expect ...READ MORE

answered Mar 6, 2019 in Python by SDeb
• 13,290 points
+4 votes
6 answers

Does Python have a ternary conditional operator like C does?

Yes, the syntax is: a if condition else ...READ MORE

answered Apr 13, 2018 in Python by Nietzsche's daemon
• 4,260 points
+1 vote
3 answers

Difference between append vs. extend list methods in Python

Python append() method adds an element to ...READ MORE

answered Aug 21, 2019 in Python by germyrinn
• 240 points
0 votes
2 answers

C++ performance vs. Java/C#

The overhead of interpreting code is much higher than ...READ MORE

answered Dec 27, 2018 in Java by iangregor
• 300 points