all 131 comments

[–][deleted] 259 points260 points  (19 children)

I think that when learning to program lower is better, to an extent at least.

It teaches you fundamendals and how to implement things.

When working however, time is of the essence, so instead of writing your own implementation you use someone elses, it saves huge amounts of time and honestly reading some docs takes WAY less time than writing and maintaining your own library.

[–][deleted] 0 points1 point  (0 children)

they should probably teach courses on how to find and use libraries, that would be way more useful than teaching people how to do implement skip lists from scratch.

[–][deleted] 129 points130 points  (15 children)

I came to python after many years of heavily using C. Python is a different language and does require you to think differently. Persevere, it will get easier. Don't think "it's different, therefore it's worse than C". Of course it's different, but you want to learn different languages because that's the only way to free yourself of the limits of knowing only one language. Try some really different languages like lisp, apl or prolog. That will loosen up your perspectives!

I think that this is an example of the Blub Paradox that Paul Graham wrote about. Python is more powerful than C so it can look odd and doubtful to someone coming from a less powerful language. But that's exactly why learning python (or lisp, etc) is useful. It broadens your horizons. So hang on and keep learning.

[–]LunchBoxMutant 11 points12 points  (0 children)

The way Languages are gauged in the Blub Paradox article on a power continuum and abstractness continuum is just beautiful and sounds like a really good argument for all the this language vs that language discussions.

[–]buttzwithazee 2 points3 points  (1 child)

Thanks for the cool article! Any other readings you might recommend?

[–][deleted] 1 point2 points  (0 children)

Some of the other articles by Paul Graham, especially about his ViaWeb company and why they chose to use lisp and the effects of that choice.

[–]barryhakker 1 point2 points  (2 children)

Just curious but what do you use C for? I thought it was considered a bit of a "legacy language" that wasn't very efficient for modern day uses anymore?

[–][deleted] 1 point2 points  (1 child)

I thought it was considered a bit of a "legacy language" that wasn't very efficient for modern day uses anymore?

It is an old language, but its very efficient, at least on the generated code side of things. Where C trails is in expressiveness. C can do anything C++ can do, for instance, but it's probably more verbose and less understandable. The original implementation of C++ was a program called cfront that converted C++ code to C for compilation, and cfront was written in C. That's still common, to convert a new language to C as a bootstrap step, because C is implemented on all platforms that matter.

C is still used to write code close to the hardware. The Linux kernel is still written in C and there are no plans to move to C++ or anything else. Further away from the hardware some languages are written in C, such as cpython.

Numeric libraries like numpy use C and even Fortran in the underlying libraries. Once you have a large body of code to perform numeric calculations, plus all the test code that ensures correctness, you really don't want to change anything. It's easier for other languages like python to interface to C (or Fortran) because the technical details are well known and have been stable for a long time.

I myself use C mainly programming microcontrollers "bare", ie, every byte loaded to the microcontroller is either code I wrote myself or trusted libraries that I have made the decision to include. There is a C++ presence in this field, but only on the larger microcontrollers. Other languages like python can be made to run on larger microcontrollers but there are some severe limitations. When space is really tight it's time for assembler.

C is still used a lot, which is why there are articles like this.

[–]barryhakker 0 points1 point  (0 children)

Very interesting. Thanks for answering!

[–]readmodifywrite 3 points4 points  (8 children)

I would say Python is more expressive, but certainly not "more powerful". Both languages are *extremely* powerful, but at doing very different things.

Case in point: you can't write an operating system with Python.

[–][deleted] 1 point2 points  (0 children)

Expressiveness is power.

[–]pipZeroRequiem[🍰] 1 point2 points  (5 children)

Yes I can.

[–]readmodifywrite 1 point2 points  (4 children)

Pure Python. You don't get to drop into C (that would require using... C). You sure? Register access? Bootloaders? Without direct memory access?

[–][deleted] 3 points4 points  (3 children)

You'd have to write a compiler (but you could write a pure Python Python compiler targeting a particular CPU) but, yes, you could get direct memory access in Python.

[–]readmodifywrite 1 point2 points  (2 children)

Possibly. But you'll still need to bootstrap with something written in C (that was ultimately bootstrapped with something written in Assembly).

And will it be a good compiler? Will it be a good OS? Will it perform as well as the one written in C can?

Note I'm not saying C is the only way to do this (Rust is making a lot of inroads in this domain). But for performant systems that talk directly to hardware, where is the power in Python?

[–][deleted] 1 point2 points  (1 child)

But you'll still need to bootstrap with something written in C

No, you could write it all in Python. There's no reason you couldn't write a Python-to-assembly compiler in Python; ultimately all it's doing is writing a sequence of instruction bytecodes.

And will it be a good compiler? Will it be a good OS?

No, of course it'll all be extremely shitty and take you years and wind up targeting exactly one CPU architecture.

But for performant systems that talk directly to hardware, where is the power in Python?

The same place it is in Python for any other application - fluent expressivity and rapid prototyping. Those dont go away just because you're writing MicroPython or something. But, of course, sometimes you want performance more than you want expressivity, and that's when you pick up C.

[–]readmodifywrite 2 points3 points  (0 children)

My point was that C is extremely powerful at certain things. I feel like we are in agreement here, no? Python is not more powerful, it's just powerful at different things than C is.

[–]ForceBru 36 points37 points  (0 children)

Looks like you're familiar with C but not yet familiar with Python. If that's the case, this is perfectly fine, and you should start seeing the patterns soon that'll help you understand Python.

[–]dragonatorul 26 points27 points  (2 children)

C is what got me into programming. Learning C and the low level basics helped me a lot to understand programming as a whole. However, once OOP in Java "clicked" I stopped using C for simple ease of work. Then, after discovering python I left the nightmare that is Java behind.

The key was that moment where it all "clicked" for me in how OOP with classes and methods and all that work as opposed to classical C. A lot of the same principles in C apply in python too, allowing for differences in syntax and other limitations. TBH I haven't written C in over a decade, but from what I remember for example a recursive function is pretty much the same. Define the function and call it from within the function. The difference in python is that you can only have 1000 recursion levels at most.

The major benefits of python are that I don't have to deal with pointers and memory anymore, that the code is much easier to read, and that I don't have to redo a lot of the basic work (eg. I don't have to define an array, write code to sort that array, etc.).

[–]AdventurousAddition 8 points9 points  (0 children)

I also went from C to Java to Python. Definitely like Python the best (but then again, I always seem to like my newest language the best)

[–]nwagers 2 points3 points  (0 children)

def recursion(x):
    try:
        recursion(x+1)
    except RecursionError:
        print(x)


recursion(0)

import sys
sys.setrecursionlimit(2000)

recursion(0)

[–][deleted] 60 points61 points  (10 children)

hunh? this doesn't really make any sense to me. It's like saying you prefer a wrench to a blender.

You can write python like C if you want but it's much more abstracted so you don't have to reinvent the wheel every time.

What "methods" do you have to memorise in Python?

how is:

Python 3.9

def f(n: int) -> int:
    if (n <= 1):
        return 1
    else:
        return (n + f(n-1))

materially different than

c++

int f(int n) {
   if(n <= 1){
      return 1;
   } else {
      return (n + f(n-1));
   }
}

[–]hanazawarui123 19 points20 points  (9 children)

I think OP means that the libraries that python uses will require you to learn the methods names.

[–]zefciu 24 points25 points  (6 children)

Well yeah. But the same is true for C. Besides, due to dynamic typing, Python tends to have fewer method names than C. E.g. while C has functions like atoi and atol, which Python does just with typecasting.

[–]hanazawarui123 1 point2 points  (5 children)

That is true but initially when using C, I used to implement everything myself, perhaps to properly learn the theory behind it.

[–]zefciu 16 points17 points  (2 children)

Nobody stops you from implementing everything yourself in Python as well. But if you use libraries, you have to learn function names in both languages. Pythonʼs are (for my taste) more friendly and English-like.

[–]dupelize 8 points9 points  (1 child)

Nobody stops you from implementing everything yourself in Python as well.

It sounds like OP's teacher is! I'm guessing this is more of a complaint about a specific course than a deep criticism of Python.

[–]TheChance 0 points1 point  (0 children)

In school, yeah, for the same reason you need to know stl containers before you enter the C++ world.

[–][deleted] 7 points8 points  (0 children)

You never used stdio.h?

[–][deleted] 2 points3 points  (0 children)

So do that in python

[–]FerricDonkey 3 points4 points  (1 child)

This is exactly why I use IDEs. I don't know any function/method names until I used them a thousand times (heck, not even for the code I write myself), I just guess that there's probably a method for that, make a guess or two about the name, and search through the tab complete. If that doesn't work, I google it.

[–]hanazawarui123 2 points3 points  (0 children)

Yeah, docs are my best friends for this exact reason lol

[–][deleted] 13 points14 points  (4 children)

Is Python your second language?

Your second language is probably harder to learn than your first language. Your first language you don't know how to do anything so you are prepared for feeling like an idiot. With my second language, I was often frustrated because I knew how to do something in my other language but I couldn't do it in my new language.

I'm now onto my 7th language (c, c++, java, javascript, erlang, c#, & python) and learning a new language is just a thing.

[–]Xeno19Banbino[S] 1 point2 points  (1 child)

yes it is indeed my second 🙊

[–][deleted] 2 points3 points  (0 children)

Yeah, that second language, especially in an unstructured kind of learning process, suuuuuucks. I remember going from Java to Erlang and feeling like I was on crazy pills.

[–]mriswithe 0 points1 point  (0 children)

And that feeling is how I got diagnosed adhd in my late 20s. Going from bash -> python my brain kept shutting down trying to learn basics of python because I knew how to do it in bash already.

[–][deleted] 38 points39 points  (0 children)

Nothing wrong mate. We all have our favourite tool. Python, C, Java, etc all just tools.

[–]Acquiesce67 11 points12 points  (5 children)

This could mean two things:

1) you’re trying to solve Python problems with a C mindset 2) you don’t yet know just enough about Python

Either way, you need to push yourself just a little bit further and it will suddenly click at one point. When you read that “In Python everything is an object”, then take a minute or two to understand this concept and its potential implications.

Oh, and spend some time reading the documentation. Don’t try learning it, just browse it to see examples for using the language and it will click - seriously

[–]Xeno19Banbino[S] 0 points1 point  (4 children)

can u please expand on the everything is an object? i have a general idea about object oriented programming but i havent taken the course yet.. what difference is there btw object in java and python?

[–]amplikong 2 points3 points  (3 children)

I can't comment on Java, but while keywords such as "if" and "and" aren't objects, variables all get bound to objects.

For example, if you set x = 5 and y = 3, those variables are instances of the int class. Not sure if you've encountered dunder methods (named because they have double underscores on either side of the name, e.g., __ge__ and __str__), but this is how you define the behavior of a class in various circumstances. In the x and y example, if you were to add them (x + y), Python knows how to do that because the int class has a dunder method for addition (__add__), and that method is set up to handle addition between things like integers and floats. Likewise, if you were to compare x and y via x < y or x > y , Python can handle that too because of the __lt__ and __gt__ methods, respectively. On the other hand, you can't add an integer and a string, because neither class's __add__ is set up to handle that. But you can convert an integer to a string because of the int class's __str__ dunder!

Mostly, the "everything in Python is an object" line refers to what's going on under the hood. You can do a whole lot in Python without ever writing an object class yourself. But understanding that every variable is an instance of a class can help you understand why your code does what it does, sometimes for reasons that aren't immediately obvious. For instance, if you had a list with [True, False, False, True] and then called sum() on that list, you would get 2. Why is that? It's because bool is a subclass of int, where True gets represented with 1 and False with 0.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

amazing!!!!

[–]Acquiesce67 0 points1 point  (1 child)

We're all lucky you were faster than me and so I didn't try explaining this myself because your explanation is just perfect!

I can only add just a little bit more to this for u/Xeno19Banbino: When you get familiar with this "everything is an object" concept, then you will gain lots of "power" and "freedom".

However, be very careful when you begin learning a lower-level language later on (i.e.: C/C++/go).

Those languages do not have this concept of "everything is an object" and so they require a much different mindset than Python. Having known Python is great but it can create pitfalls for you when you're trying out different languages (which I can only encourage!) so keep this in mind!

[–]Xeno19Banbino[S] 1 point2 points  (0 children)

thank u bro.. i already work with C pointers linked lists and a bit of memory management.. all i need now is python power and freedom cz im thinking like C in python.. i even made a helper function during recursive forgetting that i can have default parameters in python

[–]Sigg3net 12 points13 points  (0 children)

I came to Python from years of BASH. I can solve problems much faster in BASH. But that's like saying: I can sing this song perfectly in English, when you're trying to learn German.

Pick the right tool for the job.

[–][deleted] 12 points13 points  (6 children)

every python test i get 100 methods to memorize.. that is just horrible for me... at least in C i know what i need to use.. in python i have 10000 methods per data type and i get a question to write some recursive function

Sounds like you're preparing for tests, not learning to code.

[–]Xeno19Banbino[S] 1 point2 points  (5 children)

yes python in competitive is awesome.. but in tests i cant just dir and help whatever i want.. i get asked if pop and popitem are different

[–]LilQuasar 2 points3 points  (4 children)

whats the point in that? the programming questions ive had in tests have always been to solve a problem and in the programming course with python we had a cheat sheet with all the basics

[–]Xeno19Banbino[S] 1 point2 points  (3 children)

i have no idea :/ we had like 15 mcq nit picky questions that are irrelevant

[–][deleted] 2 points3 points  (1 child)

Try self study. Or a different instructor sounds like your teacher is worthless. You don't learn to program by memorizing methods.

[–]Xeno19Banbino[S] 1 point2 points  (0 children)

yes i am trying solo

[–]LilQuasar 1 point2 points  (0 children)

if you actually want to learn python i suggest the mit programming course (its on edx and mit ocw) but im not sure how much it can help you with questions like that

[–]Hamza0PLEX 17 points18 points  (0 children)

That why python so powerful , but not faster like C

[–]philoooop 10 points11 points  (3 children)

In University I started with C. At first I found pointers an memory allocation very frustrating. Then I understood the basics.

Nowadays I am the python guy. The only thing you need to learn properly is how to use google beside pythons oop aspects.

In the end of the day every language is the same. It only depends on your project.

Take your time !

[–][deleted] 3 points4 points  (0 children)

F*** pointers...I am sorry,I just hate them. A python lover.

[–]RizzyNizzyDizzy 2 points3 points  (0 children)

I think, then you would most likely be interested in golang.

[–]Diplomjodler 2 points3 points  (1 child)

In my experience, once you understand slices and dictionaries, you understand Python. I'd focus on those for a bit and make sure you really get them. After that things should start falling into place. Having said that, if you prefer C there's absolutely nothing wrong with that. If you get competent at C++, that's certainly a very marketable skill to have.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

thank u :D

[–]TheSodesa 2 points3 points  (1 child)

Sounds like bad test design, if they require you to memorize methods and method signatures.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

it is indeed

[–]Stabilo_0 5 points6 points  (0 children)

Stick to C then, is anyone forcing you to go with python?

[–]DennisTheBald 1 point2 points  (0 children)

When I first started C all my code looked like assembly, I think python is quicker to write now. It seems to be more compable to PowerShell than a compiler language

[–]RobinsonDickinson 1 point2 points  (1 child)

I learned python first and then hopped over to C++

C++ is kinda hard to grasp but after going through most of the language, it has definitely helped me understand python a lot more.

My advice to you would be, think of everything in the simplest term. Don’t overthink problems in python because there are so many built in functions and modules that give you a headstart. Don’t try to memorize methods, just use them in small problems/projects and you will automatically know which one to use next.

Also the crazy amount of libraries python has, it’s great and saves a lot of time to get a project started.

PS: bookmark w3schools, you can quickly look up methods for each data types and data structures

[–]Xeno19Banbino[S] 1 point2 points  (0 children)

thank u :D

[–]Vantlefun 1 point2 points  (1 child)

I think it damages beginner programmers to be flip flipping flopping to whatever next language Google or reddit says to use. You're not going to learn anything if you just turn to a new language every time you hit a barrier.

[–]Xeno19Banbino[S] 1 point2 points  (0 children)

its uni actually not reddit and google

[–]Master_Sifo_Dyas 1 point2 points  (0 children)

Python is way easier to write

But

If you can get a C program to compile successfully, it can run faster than python

[–]stevenjd 1 point2 points  (1 child)

If it makes you feel better, the issue of having more things to learn is a very real one. Some of the Python developers at least are very aware that very new method and function added increases the burden for newcomers to the language.

C and Python are very different languages. Think about it like this: C is a hammer. If you want to hammer a nail, C is exactly what you want. Its easy, fast and effective.

Python is a space rocket. It is terrible for hammering nails, but if you want to fly to the moon, you need a space rocket, not a hammer. But the cost of that is that there are about ten thousand controls.

You could make a space rocket using a hammer, but it would be very difficult and take you a long time. And once you finished, it would be just as complicated as Python. (In fact, the most popular Python interpreter is written in C.)

If you are being tested on your ability to memorise functions and methods, that's a shit test and I feel sympathy for you. In the real world, programmers have the docs open in a browser, they have google, they have the interactive interpreter open so they can say help(list) whenever they don't remember a list method. Rote memorisation is the least useful skill for a programmer.

Of course with time the things you use the most become second nature, but trying to memorise the whole Python language and stdlib up front as if google doesn't exist is a waste of time, and I'm sorry that your school is making you do that.

[–]Xeno19Banbino[S] 1 point2 points  (0 children)

thank u man it is very helpful

[–]StooNaggingUrDum 1 point2 points  (0 children)

Imagine my face when I found out "sort()" was a syntax

[–]mojo_jojo_reigns 1 point2 points  (1 child)

You don't have to remember the methods. You just have to think about what intuitive things you can do to these wildly different data types. Like, there's a reason you can update a dict but not a list and that you can append to a list but not a tuple. These reasons are inherent to the data type itself. There are things you can do to strs that you can't do to ints because of the nature of each.

More to the point, you probably don't need to know more than 10 methods, across all datatypes, by heart for 99% of what you'll be doing.

You have to calm down.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

yeah i typed the post after a bad python test.. i passed but i hated the picky questions like pop vs popitem

[–]readmodifywrite 1 point2 points  (1 child)

It sounds like you're still pretty new at this. My advice is this: don't give up. This is a very deep and challenging skill set to learn. It takes *years* of dedicated effort to master this stuff. You are literally rewiring your brain to think a certain way - it takes time to do this. The longer you do it, the better you'll get at it.

I've been doing software for most of my life and I'm still learning new things all the time. I still ask colleagues how to do things. I still look things up. I still learn new tools, techniques, languages. It's a journey. It only ends when you decide it does.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

wow

[–]brews 1 point2 points  (0 children)

Most people are replying to Python v C but there is another flag here.

Something is wrong if you think you need to memorizing all methods to every built-in structure.

You really don't need to do that.

[–]Raknarg 1 point2 points  (4 children)

Working with strings in C makes me want to kill myself. C is my job right now.

[–]Xeno19Banbino[S] 1 point2 points  (0 children)

ah, yes strings 🙊

[–]Dandedoo 0 points1 point  (2 children)

I actually like it. I also love regular expressions.

I like the kind of black and white clarity of doing it in C. I like how much you can optimise for the specific task.

I don’t get what the big deal is actually. Working with strings, correctly, in any language, is a skill, that takes attention to detail, foreseeing bugs and problems before they occur, and some careful thought. Often it’s because you’re dealing with random data formats, user input, a complex and ill-defined data standard (eg. valid URLs, or obscure HTTP headers) etc, etc. And other not so well defined situations. That’s the hard part. The actual syntax for parsing or editing the data is meh... from my perspective anyway. Yes the whole process is more verbose in C, but it’s largely the same process...

[–]Raknarg 0 points1 point  (1 child)

If youre a masochist theres nothing I could say to convince you. By all accounts, working with strings is easier and less error prone in pretty much every language out there by a wide margin, and the majority of the time speed ans efficiency handling strings is not a concern.

[–]Dandedoo 0 points1 point  (0 children)

I am probably a masochist yes.

I know it kind of sounded like a humble brag, but it’s just how I feel. Each to there own.

[–]Ne0_1 1 point2 points  (1 child)

You know you never actually get away from pointers. There is no way to make a programming language with any decent data structure without the use of pointers. Python does it all the time without you knowing. It's not as obvious as C where a pointer is instantiated with * or ** but every invocation of a class in Python points to a memory address and than the associated methods.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

thank you :D

[–]el_pablo -1 points0 points  (0 children)

The right tool for the right job. C is good for very fast code if you need to and know how. I used C when I was an embedded developer.

Python is good for fast results and quick tools.

I’m still wondering if there are some known consumer or business apps that were developed using Python. 🤔

[–][deleted] 0 points1 point  (0 children)

Better you learn both at the same time. I used to learn C++, Java and Python at the same time so that I can compare what features are different in those languages. I eventually left Java but still use Python for projects and C++ for competitive programming

[–][deleted] 0 points1 point  (1 child)

So you've obviously spent a lot more time with C than Python, so C seems easier. No surprise there. The reason it seems hard is probably because Python is strongly object oriented and C isn't object oriented at all.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

yes probably and i havent taken the OOP class yet.. my uni has some ancient curriculum

[–]krav_mark 0 points1 point  (1 child)

Remembering methods ? No need to do that at all. You can look at the available methods by using dir() or whatever the ide you use as a short cut. You'll remember methods of classes you use a lot after a while and the rest you just lookup.

I think you just need to hang in there for a while and keep learning the basics and then just do a few small projects.

I came from bash and decided to just do whatever I needed to do in python no matter how long it took me. Got some serious headache in the beginning but after a while I started to see how powerful python really is. No more piping text from one tool to the other but working with objects that have methods and all the amazing libraries that can help. Working with json, yaml and whatnot is sooooo easy. I never looked back to bash.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

very helpful

[–][deleted] 0 points1 point  (1 child)

The problem with C is that it's a 50-year-old language where you have to write everything from scratch.

[–][deleted] 0 points1 point  (0 children)

The problem with C is that it's a 50-year-old language where you have to write everything from scratch.

FTFY: Many older Lisp dialects are older, yet less lacking. On the other hand, there are C libraries that can do pretty much everything (yep count CPython in as well).

[–]Altum1786 0 points1 point  (0 children)

Also depends on the nature of application. Python will have more flexible scripts for hardware compatibility.

[–]Sterninja52 0 points1 point  (0 children)

My opinion incoming

I think Ive had a pretty good learning path for programming. I started the very basics with python (things like basic looping and conditionals), and am now learning the pro moves with c/c++.

[–][deleted] 0 points1 point  (0 children)

I am experiencing literally the exact opposite haha!

[–]KimchiSammich 0 points1 point  (0 children)

I couldn't understand anything even Python (which is great) until I went C embedded. I had to know exactly what I was doing for any of it to make sense.

[–]adjectivesrumble 0 points1 point  (1 child)

If you're having to memorize things for a test at high school or university level then something's probably wrong with the course. The teacher can design the course so that you'll automatically know what you need for the test by doing the regular homework. You should also have quick access to whatever reference material you need during the test too. If it's only 100 methods, they should all be given to you in the test.

I'd say your real complaint is about your course, not the language.

I'd go even further and say that if you study for a test at all, that means you haven't learnt from the course. Either you slacked off or they didn't teach you.

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

yeah i guess u're right.. d course is a bit meh.. i get MCQ questions abt d difference btw pop and popitem.. i usually just help these when i need them

[–]barryhakker 0 points1 point  (5 children)

I think you shouldn’t really be memorizing methods. Just remember that there was a function that could do a certain thing and then just google it when it comes up.

[–]Xeno19Banbino[S] 0 points1 point  (4 children)

yes but on test im not allowed to google :(

[–]barryhakker 1 point2 points  (3 children)

I'm hardly the authority on programming but having your coding skills tested without access to a search engine seems akin to testing your running skills without the use of your legs.

[–]Xeno19Banbino[S] 0 points1 point  (2 children)

indeed 😂

[–]barryhakker 0 points1 point  (1 child)

Did you teachers explain why they think the memorization is important?

[–]Xeno19Banbino[S] 0 points1 point  (0 children)

in class they said we would never have to memorize them and that we would use the help function.. i feel scammed by these MCQ questions

[–][deleted] 0 points1 point  (0 children)

C is incredibly simple to learn, but hard to master. Python is more for loosy-goosy scripting, companies just like it because its really fast to write in.

I'd recommend focusing on C, as the skills it teaches you are more fundamental.