It for sure is manageable and you will get used to it. Already knowing a programming language will help a lot (C was my fist programming language) the syntax of python was always a bit weird for me as im used to C so it could be similar for you wit the C syntax maybe. But i think it's quite intuitive once u got used to it. Also you are usually closer to the hardware when writing code but also not nearly as close as assembly for example so i think it will take a bit of practice but you will get used to it. Answer from m47812 on reddit.com
🌐
Quora
quora.com › How-hard-is-it-to-learn-C-after-Python
How hard is it to learn C after Python? - Quora
Answer (1 of 6): I think the argument could be made that Python uses a more simplified syntax than C in many ways. A good example of this would be C’s use of type cast variables vs Python’s use of non type cast variables. Another example of this would be C’s use of curly brackets to define functi...
🌐
Exactly How Long
exactlyhowlong.com › home › technology › how long to learn c++ after python (and why)?
How Long To Learn C++ After Python (And Why)?
February 23, 2024 - Learning C takes 1-2 years with consistent practice after gaining a base in Python or another introductory language. The steeper learning curve reflects C's low-level memory management complexities.
🌐
Sololearn
sololearn.com › en › Discuss › 2692923 › learning-c-after-python-
Learning c++ after python ? | Sololearn: Learn to code for FREE!
Nothing is hard just depends on you that how you practice it, read it, explore it! And you are a py coder you will not face problems while learning these! All the best! ... https://code.sololearn.com/WykoN7bcDsgX/?ref=app You can check out My Languages section as well if you like ... If you already know python very well, then C or C ++ will be very easy for you.
🌐
Reddit
reddit.com › r/learnpython › how long would it take me to learn python if i know languages like c and java?
r/learnpython on Reddit: How long would it take me to learn python if I know languages like C and Java?
February 9, 2022 -

Hello, I want to start learning python because I recently started a machine learning class at my school, and I'm wondering how long would it take me to learn all of python?

Top answer
1 of 4
2
Isn't possible to answer this question. No one learns all of Python, or all of any language. Look at a number of the introductory tutorials listed in this subreddit sidebar for some starting points. If you're working with Python for machine learning, then you'll likely be working with table/matrix libraries like Pandas and Numpy; scientific and machine learning libraries like SciPy and sklearn; and perhaps a deeplearning library like Pytorch or Tensorflow. There are also many additional libraries that extend the functionality of Pytorch and Tensorflow (thinking about Pyro for probabilistic programming, that extends Pytorch). Additionally, you'll probably want to familiarize yourself with some data vis libraries like Matplotlib, Seaborn, etc., and perhaps some database interfaces if you're working with data in databases (Pymongo, SQL, etc.). That said, there are so many libraries for Python that have nothing to do with machine learning, so... I wouldn't be surprised if you never needed to touch many of them, or didn't have any reason to seek them out. If you're looking for some basic review of Python, I would recommend one of the big O'Reilly books like Fluent Python, which is really an overview and primer on all the built-in modules, data types, and language nuances.
2 of 4
1
"all of python" is a lot different than "enough". You can learn the basics of python in minutes, maybe hours if you already know C. Then it's just a matter of practicing it until it sinks in. Using a site like this is a good reference: www.pythoncheatsheet.org There are some cool python things like comprehensions/generators/lambdas to learn, but mostly if you know C, you'll be fine just learning the syntax as well. After that it's a matter of figuring out what you need from what standard library. For example, take a look at this code: def twoSum(nums, target): store = {} for i,n in enumerate(nums): if target-n in store: return store[target-n], i store[n]=i Should not take you long to figure out what everything here is, like you might have to google what 'enumerate' is or maybe you don't know that store = {} is declaring a dictionary. But the rest of it, variable declarations, for loops, if statement, return should all be familiar. enumerate btw, returns a the index, and the value from a list at the same time as a tuple.
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 › 2513447 › is-it-easier-to-learn-c-after-learning-python
Is it easier to learn C++ after learning Python? | Sololearn: Learn to code for FREE!
December 3, 2023 - If Python was the first language you learnt then the introduction to programming concepts such as program flow, loops, data structures etc. that you received while learning it will make the journey of learning C++ easier.
Find elsewhere
Top answer
1 of 4
17

The reference implementation of Python, CPython was indeed written in C, but saying that Python is written in C is an oversimplification:

  • There are implementations written in other languages, like Jython (written in Java), IronPython (written in C#), PyPy (writen in Python), CLPython (written in Common Lisp), Psyco (also written in C), Stackless Python (written in C and Python) and Unladen Swallow (written in C++)
  • Although the CPython interpreter is written in C, it is possible to write modules for it in C++ or Cython (not to be confused with CPython), as well as C
  • What language a language's interpreter is written in is only important if you want to write modules / extensions to the interpreter itself, it has nothing to do with the language

Several languages (like Java, PHP, C# and others) are referred to as belonging to the C family, that has nothing to do with what language tools (compilers, interpreters) for said languages are written in but it means that they have very similar syntax to C. Python's syntax is very different from C, not only does it not belong to the C family, its actually quite far from it.

Apart from the CPython interpreter, the only other relation that Python has to C is that they are both multi-purpose, multi-paradigm programming languages.

Whichever one you choose to learn first will greatly help you learn the other one, and that's true for every programming language, as the one you learn first will introduce you to programming concepts and ways of thinking that are common in every language.

Python is generally regarded as a higher level language, whereas C as a lower level language, meaning that Python is closer to what we humans consider friendly and C closer to what the machine considers friendly, so Python is a little bit easier for beginners to start with.

2 of 4
11

Python syntax is nothing like that of C. So having prior knowledge of C really has nothing to do with how well you will learn python. Just because under the hood there is C code doesn't mean that you will learn python any quicker because you know C. As a python programmer you are dealing with the syntax of python not C.

🌐
Quora
quora.com › How-much-time-will-it-take-to-learn-Python-when-I-already-know-C-C++
How much time will it take to learn Python when I already know C/C++? - Quora
Answer (1 of 9): Hi, As you already know programming languages are built on logic. So it doesn't matter what the programming language is, as the logic of a program will be always same. If you know C/C++ very well then you know all the logics a programmer should know. Also I suppose you are fami...
🌐
Career Karma
careerkarma.com › blog › coding › how hard is it to learn c?
How Hard Is It to Learn C?
October 15, 2022 - The C programming language forms the basis of multiple games and animations. Since it is faster than Python and Java, it is a decent language for creating simple programs. It is not hard to learn C. Just like any other skill, you will need patience and resilience to master coding using C.
🌐
Medium
creativepartha1.medium.com › how-long-does-it-take-to-learn-c-from-scratch-5920bf8a8cc4
How long does it take to learn C++ from Scratch? | by Partha Sarathi Das | Medium
June 25, 2021 - It depends on if you know another programming language like Java and Python. Knowing other languages can provide good support when learning C++. If you don’t know any other programming languages, learning C++ may seem harder to understand even at its medium level. It will take probably more time than expected.
🌐
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, ...
🌐
ReactDOM
reactdom.com › learn-c
How long does it take to learn C? - ReactDOM
Understanding the Basics (1-2 months) The first step in learning C is understanding its fundamental concepts. This phase typically takes about 1-2 months for most learners. Syntax and Structure C's syntax is relatively straightforward compared to some modern languages.
🌐
CareerVillage
careervillage.org › questions › 975997 › how-long-should-it-take-to-learn-a-coding-language-and-where-does-someone-start-when-learning-by-themselves
How long should it take to learn a coding language, and where does someone start when learning by themselves?
October 14, 2024 - However, here's a general breakdown: Average Time to Learn a Programming Language: Beginner-friendly languages (like Python or JavaScript): You can expect to grasp the basics within 2-3 months if you dedicate 10-15 hours a week to learning.
🌐
Sololearn
sololearn.com › en › Discuss › 2063232 › i-know-ccpp-and-i-want-learn-pythonhow-many-days-or-weeks-or-months-its-takes-to-learn-
i know c,cpp and i want learn python..how many days or weeks or months its takes to learn ? | Sololearn: Learn to code for FREE!
November 8, 2019 - Considering that you already know C++ and C, then it should take you about 2-3 days for you to learn, if you choose to learn it through sololearn; But it will take you about a day to learn it if you can spend all your time into that.
🌐
Exactly How Long
exactlyhowlong.com › home › education › how long does it take to learn c++ – (and why)?
How Long Does it Take to Learn C++ – (And Why)?
February 23, 2024 - For absolute beginners, it will take 2-3 months to learn the basics on average. It takes a lot longer going forward with more complex programming problems and understanding the language in more intricate ways, which takes about 6-12 months.
🌐
Udacity
udacity.com › blog › 2021 › 03 › how-long-does-it-take-to-learn-c.html
How Long Does It Take To Learn C++? | Udacity
October 24, 2024 - Compared to interpreted languages like JavaScript and Python, compiled languages execute much faster. So how hard is it to learn C++, really? Of course, there’s not a universal answer. How long it would take you would depend on many factors, such as your background and motivation, and what you want to do with the language.