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,270 points
Good explanation, thank you @rk
0 votes


  • 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,130 points
0 votes
1 answer

Easiest way to convert int to string in C++

The C++11 version has introduced the std::stoi ...READ MORE

answered Feb 10, 2022 in Others by Rahul
• 9,680 points
0 votes
1 answer


the one way is to format your ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,720 points
0 votes
0 answers

Pre-rendering VS Server-side rendering for Angular SEO

i want to integrate an seo optimization ...READ MORE

Feb 14, 2022 in Others by Kichu
• 19,050 points
0 votes
1 answer

How to convert data from txt files to Excel files using python

Hi , there are few steps to ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,221 views
0 votes
1 answer
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP