In my opinion it's better to start learning Python.

I found it easier to learn then C or C++. It has libraries to do virtually anything you might need, and can do essentially anything.

The only reason to use a more difficult language like C/C++ is if you need the performance or are writing code for an embedded system. They are not, however, what you should be learning initially.

C# is a fine language, but nothing beats Python for ease of use.

The scope of Python is quite broad, here are some examples:

  • Create a website (Django, etc.)
  • Create scripts to do tasks ranging from image manipulation to server maintenance
  • Create GUIs (Tkinter, etc.)
  • Create games (pygame)
  • Scientific computing (SciPy)

Python can interact directly with arbitrary C code, meaning anything which can be done in C, can be done in Python with a little work. Python is popular enough that an interface has been created for virtually everything already.

For a better look at what can be done with python out of the box, take a look at the standard library which comes with python: http://docs.python.org/library/

In short, if it can be done with a computer, and doesn't require the speed of C/C++, it can be done with Python.

Answer from Wouter on Stack Overflow
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ best to learn c or python first for a computer science degree?
Best to learn C or Python first for a computer science degree? : r/learnprogramming
August 1, 2018 - If you love getting into the details, then start with C. If you prefer thinking about problems at a higher-level of abstraction, then start with Python. Abstraction and knowing the right level of abstraction for solving problems is an important concept in computer science.
๐ŸŒ
Quora
cstdspace.quora.com โ€บ Should-I-learn-either-Python-or-C-first
Should I learn either Python or C first? - C Programmers - Quora
Answer (1 of 24): When people on Quora ask questions along the lines of โ€œwhat computer programming language(s) should I learn first?โ€, my answer is invariably always the same, because the โ€œfirstโ€ implies that they intend to learn multiple languages, which implies that they want to program ...
๐ŸŒ
Sololearn
sololearn.com โ€บ en โ€บ Discuss โ€บ 281291 โ€บ solved-what-should-i-learn-first-c-or-python
[Solved] What should I learn first, C or Python? | Sololearn: Learn to code for FREE!
It took 3 to 4 days to learn the basic syntax of python for me. So, it totally depends on you. whether you want to learn the hard way or the easy way. but anyway, you should try to learn both.
๐ŸŒ
Hacker News
news.ycombinator.com โ€บ item
Ask HN: Is it worth it to learn C to better understand Python? | Hacker News
February 3, 2022 - For instance, when you only need to write two curly braces to create a โ€œdictionaryโ€ (of course behind the scenes this is a hash table) many of the nuances of that data structure are hidden from you. You have no idea that accesses are O(1) amortized but worst case are O(n). Even if you do, ...
๐ŸŒ
Quora
quora.com โ€บ As-a-beginner-should-I-learn-C-or-Python-as-my-first-programming-language
As a beginner, should I learn C or Python as my first programming language? - Quora
Answer (1 of 48): Depends on what you want to do with your life and how seriously you take programming. If you're programming for fun, perhaps you should focus just on Javascript, Python and Ruby. Not because they're toy languages - far from it - but because they're the kind of language that you...
๐ŸŒ
Raspberry Pi Forums
forums.raspberrypi.com โ€บ board index โ€บ programming โ€บ general programming discussion
Learn C or Python first? - Raspberry Pi Forums
January 6, 2017 - I would start with bash and do the sorts of simple scripts, or not simple ones, that everyone needs to improve their use of their systems. Then you can learn by doing and that makes it more interesting. Since bash is a million times crazier than Python and C combined, figure it out and you'll be fine anywhere. I think before you do a project in C, you should justify why you are doing it in C.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ should i learn python or c?
r/learnprogramming on Reddit: Should I learn Python or C?
July 9, 2024 -

I am a high school student. I want to become a "good" software engineer in future. I want to learn programming due to my interest in computers and technology. I don't have any specific goal or interest, like web development or any other.

Some say to start with Python, as it will help to start easier, then learn other languages.

Some say to start with C, as it will teach me basics of programming and will make it easier to learn other languages. Python will make it difficult to learn complex languages, like C++, and I will learn bad habits from Python, as it is very easy.

I know I may be wrong, but I don't have much knowledge about programming. Please help me decide between Python and C.

Top answer
1 of 4
7

In my opinion it's better to start learning Python.

I found it easier to learn then C or C++. It has libraries to do virtually anything you might need, and can do essentially anything.

The only reason to use a more difficult language like C/C++ is if you need the performance or are writing code for an embedded system. They are not, however, what you should be learning initially.

C# is a fine language, but nothing beats Python for ease of use.

The scope of Python is quite broad, here are some examples:

  • Create a website (Django, etc.)
  • Create scripts to do tasks ranging from image manipulation to server maintenance
  • Create GUIs (Tkinter, etc.)
  • Create games (pygame)
  • Scientific computing (SciPy)

Python can interact directly with arbitrary C code, meaning anything which can be done in C, can be done in Python with a little work. Python is popular enough that an interface has been created for virtually everything already.

For a better look at what can be done with python out of the box, take a look at the standard library which comes with python: http://docs.python.org/library/

In short, if it can be done with a computer, and doesn't require the speed of C/C++, it can be done with Python.

2 of 4
4

I would say it depends on what you want to achieve (cheesy answer...)

The truth is, learning language is a long process. If you plan on learning a language as a step toward learning another language, you're probably wasting your time.

It takes a good year to be proficient with C++, and that is with basic knowledge of algorithms and object concepts. And I only mean proficient, meaning you can get things done, but certainly not expert or anything.

So the real question is, do you want to spend a year learning C++ before beginning to learn Python ?

If the ultimate goal is to program in Python... it doesn't seem worth it.

Find elsewhere
๐ŸŒ
Medium
medium.com โ€บ tech-learners โ€บ is-c-programming-knowledge-is-a-must-to-learn-python-programming-language-972953988a66
Is C Programming Knowledge A Must To Learn Python or Any Other Programming Languages? | by Muhammad Sakib Khan Inan | TechLearners | Medium
March 23, 2022 - If you are a complete beginner in coding and want to learn Python, then I will say without thinking twice you should start learning Python. Donโ€™t get worried about the confusion that you need to learn C first.
Top answer
1 of 6
11

The question is actually more complex than it might appear, and really the answer can depend on the context. For example, at what age are the students when they are first taught to program? Is this in Primary School, High School or part of an undergraduate programme? The answer might be different in each case.

It also depends on the purpose of teaching the initial programming language (IPL). Is the purpose to lead towards a practical skill (vocational programming), or is it to enable the teaching of some knowledge of algorithms (pedagogic programming), is it to enable the functioning of some devices (engineering programming) or is it to prepare students for further study? Each of these questions could lead to a different language as an IPL.

For a very early age start of programming one does not have to worry about employment or future curricula so something engaging is important, so tools such as MIT Scratch have a role. For later childhood Python fills a nice niche, particularly as it can run on a wide variety of inexpensive platforms (such as Arduino's, Raspberry Pi and so forth) which provides accessibility and make it within the reach of the classroom and individual students.

Conversely, if one is looking at an undergraduate IPL then it may depend on which degree programme is being considered. Is it a degree in Computer Science, Engineering, Biology, Chemistry or Physics? One would then need to take into account what graduate employers might be looking for and tailor to that market.

Python might have value in some of these programs but the students would also have to learn other languages at some point. For example, Computer Scientists would need a wider experience that would embrace C#, C++ (among others). Electronic Engineers might need C, but Computer Scientists less so. Biologists might need R, Chemists and Physicists might still need Fortran!

However, I would say that I might never recommend C as an IPL, and would start at C++ even for the most hardened Electrical Engineer. I only show Computer Science students C in specific contexts (like working with flex and bison)!

One thing I say to my students in the course where I look at Languages is that there is no one best language. The choice of language for any particular situation is so very context dependent on resources available, skills available, the purpose of the programming and the end goal of the task, and for an IPL that advice still holds true.

2 of 6
5

I started teaching Python at NCSSM in 2004. Here are some reasons I chose it.

  1. It is direct and simple, and there is not a whole ton of boilerplate to deal with at the beginning. Hello, World looks like this

    print("Hello, World")

We all know what it looks like in Java (enclosing class needed) and C.

  1. Delimitation occurs via whitespace. Students who begin with Python tend to have excellent formatting habits when they learn other languages, because Python requires them. There is a direct visual connection between the flow of a program and its appearance.

  2. It's a professional tool. Students don't "outgrow" Python. It has a rich standard library and numerous third-party libraries that make it an awesome tool.

  3. It supports OO, functional, and imperative programming paradigms

  4. Memory management on the heap is largely abstracted away.

  5. The built-in types provide a significant creative palette. We teach our students to "use wheels, not re-invent them." An exception to this is when we are "dissecting" something to gain an understanding of how it works.

  6. It runs on everything and web interfaces for it are freely available.

Long experience shows that Python is an excellent language for beginners.

C is not great for beginners. However, it is very important. In many ways it is the "Latin" of computer languages. Every programmer should know it, because it lurks beneath the surface in so many places. We teach it to students who are already proficient programmers.

๐ŸŒ
Coursera
coursera.org โ€บ coursera articles โ€บ computer science and engineering โ€บ software development โ€บ python vs. c++: which to learn and where to start
Python vs. C++: Which to Learn and Where to Start | Coursera
February 21, 2026 - Python excels at web development and data analysis, while C++ performs better with creating operating systems and game development. You can learn how to use either programming language via a combination of self-learning, instructor...
Top answer
1 of 7
31

I knew C before I knew Python. No offence intended, but I don't think that your C knowledge is that big a deal. Unless you read very, very slowly, just set out to learn Python. It won't take that long to skim through the material you're familiar with, and it's not as if a Python tutorial aimed at C programmers will make you a better Python programmer - it might teach you things in a different order, is all, and raise some specific things that you would do in C but that you should not do in Python.

Strings in Python actually are somewhat different from strings in C, and they're used differently. I strongly recommend learning them "from scratch", rather than thinking about them in terms of their differences from C strings. For one thing, in Python 2 it's best not to use Python's "string" class to represent strings: there's a separate unicode string class and for practical Python apps (pretty much anything involving user data), you need that. (Python 3 fixes this, making the str class a unicode string). You need to establish a good working practice for unicode/byte data and decode/encode.

A common mistake when learning a second programming language, is to think "I know how to program, I just need to translate what I do in C into Python". No, you don't. While it's true that an algorithm can be basically the same in different languages, the natural way to do a particular thing can be completely different in different languages. You will write better Python code if you learn to use Python idiomatically, than if you try to write Python like a C programmer. Many of the "tricks" you know that make sense in C will be either pointless or counter-productive in Python. Conversely many things that you should do happily in a typical Python program, like allocating and freeing a lot of memory, are things that in C you've probably learned to think twice about. Partly because the typical C program has different restrictions from the typical Python program, and partly because you just have to write more code and think harder to get that kind of thing right in C than you do in Python.

If you're learning the language because you urgently need to program a system/platform which has Python but doesn't have C, then writing Python programs that work like C programs is a reasonable interim measure. But that probably doesn't apply to you, and even if it did it's not the ultimate goal.

One thing you might be interested to look at because of your C experience, is the Python/C API. Python is great for many things, but it doesn't result in the fastest possible computational core of scientific apps [neither does C, probably, but let's not go into FORTRAN for now ;-)]. So if you're aiming to continue with scientific programming through your move in Python, and your programs are typically memory-bus- and CPU-bound doing immense amounts of number-crunching (billions of ops), then you might like to know how to escape into C if you ever need to. Consider it a last resort, though.

You do need to understand Python reasonably well before the Python/C API makes much sense, though.

Oh yes, and if you want to understand OOP in general, remember later on to take a look at something like Java, Objective-C, C++, or D. Python isn't just an OO language, it's a dynamic OO language. You might not realise it from comparing just C with Python, but dynamic vs static types is a completely independent issue from the OOP-ness of Python. Python objects are like hashtables that allow you to attach new fields willy-nilly, but objects in many other OO languages store data in ways which are much more like a C struct.

2 of 7
15

I learned everything I know about Python from the official documentation: http://docs.python.org/

And it's free.

๐ŸŒ
Edureka
edureka.co โ€บ blog โ€บ python-vs-c
Python vs C: Top 12 Differences You Must Know | Edureka
June 6, 2024 - One of the main choices that lay ahead of you is the choice of programming language (Example โ€“ Python vs C). Before starting to learn any form of programming, you need to figure out which language suits you the best. To get in-depth knowledge on Python along with its various applications, you can enroll for live Python training with 24/7 support and lifetime access.
๐ŸŒ
DEV Community
dev.to โ€บ techlearners โ€บ is-c-programming-knowledge-a-must-to-learn-python-or-any-other-programming-languages-p5b
Is C Programming Knowledge A Must To Learn Python or Any Other Programming Languages? - DEV Community
January 5, 2021 - You should not try to learn C (or C++) as your first language. Get proficient in Python (an excellent learning language as well as useful production one) and JavaScript (awful, really, but it's everywhere) instead first.
๐ŸŒ
Sololearn
sololearn.com โ€บ en โ€บ Discuss โ€บ 2082579 โ€บ what-should-i-learn-first-c-or-python-3-and-why
What should i learn first ? C++ or python 3 ? And why?
November 28, 2019 - Sololearn is the world's largest community of people learning to code. With over 25 programming courses, choose from thousands of topics to learn how to code, brush up your programming knowledge, upskill your technical ability, or stay informed about the latest trends.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ c or python?
C or Python? : r/learnprogramming
July 21, 2021 - Including AI and machine learning. But C is definitely the way to go if you want a solid knowledge of the the intricacies of code. Python does all the hard work for you. So you won't be as knowledgeable as an experienced C/C++ developer. One correction. C is a functional language.
๐ŸŒ
Udemy
blog.udemy.com โ€บ home โ€บ python vs c: important differences you should know
Python vs C: Important Differences You Should Know - Udemy Blog
May 3, 2022 - So many, in fact, that they are ... you want to do. If you plan on working on hardware and low-level systems or with applications that depend on speed and performance, then C is the language for you....