Difference between C and Python
Here are some of the differences between C and Python.

| C | Python |
|---|---|
| C is a language which is mainly used for hardware related applications. | Python is a general purpose programming language. |
| An Imperative programming model is basically followed by C. | An object-oriented programming language is basically followed by Python. |
| Variables are declared in C. | Python has no declaration. |
| C doesn’t have native OOP. | Python has OOP which is a part of language. |
| Pointers are available in C language. | No pointers functionality is available in Python. |
| C is a compiled language. | Python is an interpreted language. |
| There is a limited number of built-in functions available in C. | There is a large library of built-in functions in Python. |
| Implementation of data structures requires its functions to be explicitly implemented. | It is easy to implement data structures in Python with built-in insert, append functions. |
| C is compiled direct to machine code which is executed directly by the CPU | Python is firstly compiled to a byte-code and then it is interpreted by a large C program. |
| Declaring of variable type in C is necessary condition. | There is no need to declare a type of variable in Python. |
| C does not have complex data structures. | Python has some complex data structures. |
| Syntax of C is harder than python because of which programmers prefer to use python instead of C | It is easy to learn, write and read Python programs than C. |
| C programs are saved with .c extension. | Python programs are saved by .py extension. |
| An assignment is allowed in a line. | Assignment gives an error in line. For example, a=5 gives an error in python. |
| In C language testing and Debugging is harder. | In Python, testing and debugging is not harder than C. |
| C is complex than Python. | Python is much easier than C. |
| The basic if statement in c is represented as: if () |
The basic if statement in Python is represented as: if: |
|
The basic if-else statement in Python is represented as: if ( ) else |
The basic if-else statement is represented as: if : else: |
| C language is fast. | Python programming language is slow |
Recommended Posts:
- Python set operations (union, intersection, difference and symmetric difference)
- Python Set | difference()
- Difference between == and is operator in Python
- Difference between various Implementations of Python
- Python | Difference between two lists
- Python | Difference between iterable and iterator
- Python | Pandas TimedeltaIndex.difference
- Difference between Method and Function in Python
- Python | Difference in keys of two dictionaries
- Python | Pandas Index.difference()
- Python | Difference between Pandas.copy() and copying through variables
- Python | Generate successive element difference list
- Python Set difference to find lost element from a duplicated array
- What is the difference between GUI and CUI?
- Difference between ++*p, *p++ and *++p
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



