This is just my opinion, I'm a firm believer in starting with python, then moving to something like C/C++. Remember that being a beginner programmer doesn't mean your learning a language, your learning how you solve a problem and translate your solution into an algorithm. I think python is a good starter language because it's really close to plain English, so you can focus on developing algorithms without worrying too much about syntax. Once you have developed that skill more in depth and are more comfortable with translating your ideas to python, then maybe start dabeling in C and you can start to get a better feel for working with memory, pointers, etc. Good luck! Remember this most important thing is to not get to hung up on picking a language, just throw yourself into it. Answer from EvanNotSoAlmighty on reddit.com
🌐
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 ...
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.

🌐
Sololearn
sololearn.com › en › Discuss › 281291 › help-what-should-i-learn-first-c-or-python
[Solved] What should I learn first, C or Python? | Sololearn: Learn to code for FREE!
wel, it is 50/50. you can choose ... you need only 1 line: print("Hello World ") so, python usually become the language of choice for beginners coz its much more easier to learn. but c is more close to the machine so its a good ...
🌐
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 - It can be simplified like this that before learning any other language you must need to learn “C’. I decided to write an article about this when one of my classmates reached me with the same type of problem which I mentioned in the very ...
🌐
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 - I would say that it isn't important when you learn C as long as you learn it at some point (and before you tackle certain subjects like os). A beginner would have an easier time going Python -> Java -> C than pulling out good old K&R straight away.
🌐
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...
Find elsewhere
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.

🌐
Pythonin1minute
pythonin1minute.com › can-you-learn-python-without-knowing-c
Can You Learn Python Without Knowing C? | Python in 1 minute
One of the reasons for python’s success is that it’s very beginner-friendly. It is absolutely possible to pick it up without any prior experience, you don’t need to know C or any other programming language to learn python.
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.

🌐
Sololearn
sololearn.com › en › Discuss › 1695126 › is-c-language-is-basic-to-learn-python-
Is c language is basic to learn python | Sololearn: Learn to code for FREE!
Because Python is made in C doesn't mean you need to learn it. It is supposed to be an opposite and make a fast learning environment, unlike C. ... From a beginner to a beginner: Yes you can.
🌐
Quora
quora.com › Is-it-compulsory-to-learn-C-before-I-learn-Python
Is it compulsory to learn C before I learn Python? - Quora
Answer (1 of 21): No. Since you mentioned 'learn', I am assuming you're trying to learn “programming”. If that's true, then, I suggest, you find out what's the most convenient language for you to learn programming and get good at it before moving on to other languages.
🌐
Sololearn
sololearn.com › en › Discuss › 388300 › do-you-need-to-learn-cc-first-before-python-
Do you need to learn C,C++ first before python ? | Sololearn: Learn to code for FREE!
December 3, 2023 - I heard python is a must for the field but I am not proficient or smooth in C . What should I do ? ... No you dont need to learn C or C++ to learn python or any other programming language.
🌐
Datatas
datatas.com › should-i-learn-c-or-c-before-python
Should I learn C or C++ before Python? - Datatas
August 18, 2023 - So, if you are interested in learning Python but don’t have any experience with C or C++, don’t let that stop you. Python is a great language to learn for beginners and experienced programmers alike. Python is a great language for beginners as well as veteran programmers. But there comes a time when you might need to move on to a more powerful and low-level programming language, such as C or C++. Choosing between the two can be a tough decision, especially if you’ve only worked with Python before.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › general programming discussion
Learn C or Python first? - Raspberry Pi Forums
January 6, 2017 - JFamily wrote:I want to learn both C and Python, I just don't know which one I should start withI learned BASIC before C, which is similar to learning Python first. However there is a lot to recommend learning C, especially of you are an adult and already have some computer experience.
🌐
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.