r/learnpython • u/[deleted] • Jun 15 '21
Is it ok to learn python and use it exclusively?
Hello,
im looking to learn a programming language for fun, and have been learning python via "python crash course 2nd edition". its been a smooth ride so far, currently im learning about dictionaries. I wanted to get an opinon from other coders if using just python by itself to make programs (not looking at doing any web stuff or machine learning) is a good idea. should i learn another language if i want to have more to play with, or does python offer that? excuse my ignorance.
EDIT: Wow, thank you very much for all the responses. I really appreciate it. I think it's safe to say, that sticking with python is the way to go. Like some of you have said, maybe i will get into something else down the road, maybe not.
2
u/hugthemachines Jun 15 '21
If you found a programming language you enjoy. Just go for it. Some people get fixated on picking the perfect language to begin with, that can be a mistake. Python is a very nice first language and while you learn your first language you also learn the art of programming. I would recommend that you Learn Python for quite a while first and then you will notice if you need another language for some stuff.
2
Jun 15 '21
if i was to learn another language, it would either be C, or freeBASIC (no its not A BASIC language dispite it being in its name). my curiosity also has me intrested in asm just becuase i like to know how everything works under the hood.
59
u/ToelTsuki Jun 15 '21
Python is a really good "swiss army knife" language to know. So yes for most usage, you'd be fine with it.
Learning another language however allows you to see and understand things from a different perspective altogether. This levels up your programming skills in a more fundamental sort of way.
16
u/desran00 Jun 15 '21
I would say that Python is a good glue language, but you can also build stuff out of glue.
12
u/wolfmansideburns Self-taught Pythonista Jun 15 '21
That's what 3D printing is, right?
2
u/desran00 Jun 15 '21
Yea, I love 3D printing. Too bad I haven't found many ways to use Python with it, though.
10
6
u/mholtz16 Jun 15 '21
Yes, this.
And to tie it back to "depends on what you want to do?" a swiss army knife has a pretty useful knife but I wouldn't want to butcher a steer with it. It has a screw driver but I wouldn't want to install drywall screws for a room with it....
At the end of the day, there is a helluva lot you can do with a swiss army knife but it may not be the best tool for some applications. (exchange python for swiss army knife).
0
Jun 15 '21
[deleted]
2
u/bluesFromAGun Jun 17 '21
I think C (or C++) is nice since there’s plenty of ways (e.g. extensions, ctypes, cffi) to interface it with Python and it’s a good complement. If something needs to be fast you can write that particular thing in C but still use Python for the rest of code. Also works if you need to call something in the OS or similar that’s not available directly from Python.
216
u/desran00 Jun 15 '21
Everyone is just going to say that it depends what you want to do, so I'm gonna say that it depends on what you want to do.
46
7
-27
u/bigno53 Jun 15 '21
Good way to get upvotes.
29
u/aDyslexicPanda Jun 15 '21
A good way to get downvotes apparently
17
12
15
7
Jun 15 '21
It's about as okay as having red wine with your steak if you are over the age of 21 in the U.S.
19
u/totallygeek bandarji Jun 15 '21
I'm sure at some point in the past, people stated:
Pascal seems to have everything I need in its bag of tricks. It's easy to read and write, plus a vast number of library units exist for it.
Perl works extremely well for all my needs. CPAN contains modules for everything I can imagine needing to write. A strong community exists where I can ask questions and receive nearly-real-time support.
But, not many people write software in either language these days. Support for Python might end up that way some day in the future. Nothing wrong with learning Python, learning it well and using it exclusively. Just realize that the people investing their time and energy into libraries will likely retrain their focus on some other language down the road. It happens.
4
u/Sunfire551 Jun 15 '21
There surely is no harm in learning new languages. Quite the contrary even, it will also help you advance your python skills, since most languages use the same base principles, but focus on slightly other things that can be translated into other languages
4
Jun 15 '21
I'm not sure I agree, especially at the very early stage it sounds like OP is. The person who spends their first couple years programming getting better and better with one language and making progressively more advanced projects with it is probably going to level up their overall coding skills much more than somebody who spends the same time learning syntax and making simple beginner programs in five different languages.
1
u/Sunfire551 Jun 15 '21
See your point and if i am honest that’s something i struggle with myself, pretty new to programming aswell. But my understanding of it was not that you should try to keep up with all the other languages to be as good or close to it as your main language. Just ’dipping‘ into other languages and playing arround with certain key concepts that differ from python‘s could help you see your projects and code from another perspective.
4
u/BaalHammon Jun 15 '21
Since you say you're looking to have fun, I think python is a good choice, perhaps the best choice in the sense that it's a mainstream and well-supported programming language, it's mostly intuitive as long as you're doing simple things and it doesn't get in the way of the fun.
I'm assuming that what you find fun here is the making of programs, either small utility programs, little games, stuff like that.
Because python is mainstream and well-supported, it has a lot to offer in terms of libraries for doing plenty of cool stuff without having to learn any other language and because its syntax and core constructs are relatively simple and straightforward you can get by and play !
Here's the "depending on what you want to do" part of my comment :
I've made an assumption above about your idea of fun, but I could be wrong. If you're more mathematically inclined and you enjoy the theoretical aspects of computer science, you might want to take a serious look at functional programming and languages like Haskell or OCaml (python does have constructs inspired by this style but it's overall not very well-suited for it).
If you're more interested in the systems aspect of programming, how an operating system works for example, and how programs interact with it, you might want to learn Rust, or D, or C, and the latter especially if you're interested in the hardware side of things.
But otherwise don't worry about all of this. The world of computer science is big and limiting yourself to python is not a bad decision to make for now.
7
u/pyrrhic_buddha Jun 15 '21
I decided to stop learning other programming languages and focus on Python 5 years ago.
I forgot everything I knew about Java, and couldn't be happier about it.
I still know how to deal with javascript, and I do believe it is a good 'safety' option to learn along the way.
Golang is great, if you ever have the time to learn it as something new, it is worth it.
I work as a Software Engineer with plenty of data science stuff, and I would say that only knowing Python is pretty okay, there will always be a place for people who know strictly python (and, of course, other tools such as deploy and code analysis...).
8
5
u/snapetom Jun 15 '21
Go and Python are my preferred languages. I use Go for high performance data engineering needs, Python for everything else. I've told recruiters that I'm not interested in any jobs that aren't primarily Go and Python. Hasn't been a hinderance at all.
1
u/senpaithirdy Jun 15 '21
Your first programming language is not your all-projects-language. This is my misconception also when I was starting out, I was focused on python and tried every other projects using only python. After a while, I realized that I can do different projects easily in different programming language as each has their own purpose.
This is my advice, your first programming language will not be your last, you will only learn there the fundamentals and concepts of programming. Once you know all of that, you can now transition to other languages based on your project preferences or what you want to do. You want to build a mobile app? Java/Kotlin and Swift. You want to build GUIs? C# or Java. You want to develop websites? Use Wix, JK.
1
1
Jun 15 '21
Quit overthinking it and just learn the most broadly useful and broadly popular language. Once you know Python, you could easily transition to more specialized languages for application components where Python isn't good enough. What you will find is that those situations are few and far between unless you're doing some extreme engineering.
1
Jun 16 '21
your right, i have a problem of overthinking. go figure...
1
Jun 16 '21
I've seen it before. Spotted it a mile away. /img/j3guqj2361m31.jpg
Go learn Python. With an investment of an hour or two a day for 6 months and a buddy on speed dial who could help you troubleshoot (or liberal use of asking questions on this forum and stackoverflow) and you should be fairly proficient. Do not discount the significance of having access to quality feedback. It will take, without exaggeration, 10 times as long to learn anything without access to some kind of guide.
If you do this, you'll accidentally learn how to program along the way (a separate skill from Python itself). At that point, you'll be able to answer all of your own questions about whether to learn another language, and it'll become easier to vet whether or not simple projects like making a little website are going to be feasible or not. Asking those questions now is inappropriate.
My parting advice is to start small. Chase as many little wins as you can. Carefully follow a book, or follow along with some youtube tutorials. You can do deep studying in individual computer science topics after you know your way around an IDE and how to run your code etc. but for now, you just want to gain some familiarity with the tools and also have lots of little victories to get you excited. Chasing small wins on a daily basis and finishing mini-projects early-on will give you the momentum you need to turn this into a lifelong hobby or even a lucrative skill. Trying to guess what it looks like to learn this in the most perfect way is a fool's errand. Take the plunge, good luck.
1
u/zeebrow Jun 16 '21
No. It's in Python's terms and conditions that foreign interpreters and especially compilers are automatically removed from your system.
:)
1
3
u/rocketjump65 Jun 15 '21
I have a different view. It depends on how smart you are and how long you want to keep going at this hobby.
If you're new and just picking up the basics than I can say just stick with python, it's good.
If on the other hand you ABSOLUTELY love this programming game, and you're sure you want to be "elite", then I might suggest that you learn multiple languages as your "first" language.
When you learn programming with a specific language as a your core curriculum basis, you sort of develop blindspots where that given language makes assumptions about how to "do" things.
For instance, you might learn C++ later in life, and be confused how indentation is not actually part of C++ syntax. In C++ indentation is totally optional. And that kinda sucks.
So I think it would be cool for a beginner to slow things down, and learn programming simultaneously on all the "good" languages simultaneously, learning the subtle differences in their implementation of the core building blocks, like loops, data types, and lists, and dictionaries to be specific.
I dunno. It's a wacky idea, and I suspect it would take additional patience. But that's easy to muster up if you're self taught anyway right?
1
2
u/SnuffUp Jun 15 '21
I’m going to hit back with a question: why do you want to use exclusively Python?
I don’t think it’s a matter of if you can, it’s more about why limit yourself to just Python.
Keep in mind that understanding fundamental concepts will get you way further than memorizing syntax. Google syntax, or have a cheat sheet - that’s not the most important part.
Focus on learning structures, algorithm design, fundamental methods of problem solving and breaking ideas/problems into actionable steps, etc.
Don’t be overly concerned with the syntax of any particular language! Learn in Python is fine, but 90% or more of what you learn will be common across most any language, if you focus on learning the important things.
2
u/Ernigrad-zo Jun 15 '21
people are giving technical answers, a practical answer is that there are only three langues
Python - can do everything you could possibly need until you get to the point that you understand so much programming stuff it's obvious what your next step should be. Used professionally for everything from the most basic gui tools to full on machine learning and big-data analysis.
C and variants - if you're making complex games or low level things like drivers it might give you a speed boost (though for a lot of stuff python is only a whisker behind if you're using good libraries like Pandas, Numpy, or PIL to do the heavy lifting)
internet languages - HTML, Java, etc great starting point if you want to do webstuff but if not then you might as well use python.
Python is a great language to get good in because it's got modules for everything, a great community and endless learning tools and guides.
2
Jun 15 '21
Yes it is fine. It’s also fine to want to learn other languages. It’s also fine to change your mind.
2
u/Suppenspucker Jun 15 '21
It’s probably also fine to ignore this well meant and well thought through answer and either learn a ton of languages and not be able to do anything with it, or only learn python and much later find out that another language was much more suitable.
1
Jun 15 '21
OP said it was just for fun, so from that angle, do what is most fun and appealing, not what is "best". Then when OP finds something that they would like to do differently or Python isn't great at it, then they can find something that is.
If they were looking for professional advice, obviously it would be different.
1
u/bigno53 Jun 15 '21
I agree with the other answers. I also think python is a good language to start with because you can do some pretty cool stuff without having to spend a lot of time learning theory. The other good thing is once you get good with python, you’ll have a much easier time picking up other languages.
1
u/notParticularlyAnony Jun 15 '21
you'll be fine, even if you do want to do web stuff, and especially if you want to do machine learning
1
u/menge101 import functools Jun 15 '21
It is ok.
In the long run, like in the rest of your life, you will probably learn something in addition to it. Let your needs guide you.
The important thing about a first language is that you learn basic things like syntax and that language's idioms, but that you also learn abstract things like application design and algorithms, that can be carried to any other language.
1
u/madmoneymcgee Jun 15 '21
Python and all the other languages are just a tool. Learn the tools you need for the job.
That said, the more you understand about programming/computer science through python the easier it'll be picking up new languages and understanding their concepts. The syntax may still be challenging (and in those instances knowing a ton of python may throw you off in small ways) but overall you'll be stronger.
1
u/Sawertynn Jun 15 '21
In my opinion, first get good in one language, can be python. After getting some experience you will more easily see what you want/need and be more familiar with other stuff. So don't look for another language, at least not yet
1
u/BlhueFlame Jun 15 '21
Yes go nuts on Python. You can do plenty in that language. When you are a veteran in one years time, you can pick up other languages in a matter of weeks. If you want to. Python is a good tool for a lot of stuff.
2
Jun 15 '21
You can learn a lot in one year, but you won't be a veteran
0
1
Jun 15 '21
Define programming for fun? Programming in the end is about creating something. You might be having fun now since you're learning new things but once you learn all the basics you definitely need to categorize what you want to do so you can learn intermediate/advanced things accordingly. It's like any hobby, the learning process is always fun so you have lots of newbies, but people usually drop it once they finish the basics because they don't have an idea where they actually want to take it - they get bored or something.
So yea, while learning you should also start thinking what you want to program for fun
1
1
Jun 15 '21
You've started learning Python and you like it - think of it like getting to know one kind of general purpose tool - an enhanced version of a swiss army knife for example. One day you'll stumble upon a problem that Python is ill suited for and then you'll need to learn another language to do it. If you want to keep up the motivation I'd recommend focusing on your goals and researching how best to achieve that, you'll learn a lot that way and get things done faster.
1
u/PaulSandwich Jun 15 '21
Short answer: Yes.
Longer answer: I'd be shocked if you were able to use Python "exclusively". If you use Python in a professional setting, you're going to learn about other languages/platforms anyway, and a foundation in Python is going help a lot. So don't sweat it. Learn all you can in the language you like, and don't be surprised when those other languages seem a lot less intimidating when they eventually need your attention.
1
u/-SPOF Jun 15 '21
I use it exclusively only for porpuses that I need for my own projects. I do not know if it counts.
1
1
1
Jun 15 '21
Sure, depends on what you want to do, but also I think focusing on expertise in 1 language is better than being mediocre at multiple, and jobs will be looking for someone with knowledge of 1 language for the most part.
So should you? I think so.
1
u/zach0610 Jun 15 '21
See some stuff through with it. If your interest/scope grows and you need other languages great, then do that then. Just drink it up and keep learning, don't worry so much about what language, you can do a lot with a lot of languages. To answer your question yes, it's what I'm doing :)
1
Jun 15 '21
I'm going to break with the "it depends what you want to do" crowd and just flat out say yes. If you truly get to the point where you have something you want to accomplish and Python isn't sufficient for it, then at that point learn whatever language is. But in the meantime, nearly anything that a single individual in their first few years of programming could realistically build, Python is going to be more than capable of building it.
1
u/NDaveT Jun 15 '21
im looking to learn a programming language for fun
It's fine to use Python exclusively. It can do a lot and it will cover most of the programming concepts out there. If you ever find yourself in a situation where another language could accomplish what you want to do better than Python can, then you'll probably feel motivated to learn that language.
Once you learn one language it's easier to learn others because the underlying concepts are what's really important.
1
u/tomanonimos Jun 15 '21
If coding and automation is more of a supplement than your main thing. If coding in general is your main thing then no. You can use it a majority of the time but you'll need to have some knowledge in other languages.
1
Jun 15 '21
Yes it is wrong. You should know multiple technologies, be it networking, operating systems, databases, or something. There is nothing more useless than a one trick pony. That goes for everyone. I hate having to explain to someone like a DBA that their query uses disk IO or to developers why authentication and RBAC exist.
1
Jun 15 '21
That’s sort of what I’m doing. At least for now. I’m not trying to be a dev, I just want to be able to work with data more effectively, and also build my own MVP apps. Python can do both, so I’m focusing on that, and I’ll supplement as I go. There’s so many libraries available for Python now that you can do just about anything in it.
1
u/Rusca8 Jun 15 '21
Actually Python feels like one of the most versatile ones. You have libraries for everything you could imagine (and I think it's actually a really good language for machine learning).
So yeah, I'd say you're good.
Also, you can use python for web stuff too (the easy option is probably Flask, with Bootstrap in order not to need a lot of HTML/CSS knowledge).
1
u/pblankley Jun 15 '21
Of course it depends on what you want to do, but there's also a TON of value in being *really* good at one language as opposed to being competent in a bunch of languages.
If you get really good at python and don't touch other languages IMHO you're able to build more real stuff and thus be more employable than if you're just competent in a bunch of languages
1
u/sleeplessval Jun 15 '21
Python is a great language to work with, and its syntax makes it really approachable. I run Linux, and Python is my first choice for scripting since it's capable enough to even script small programs without hassle.
I'll say straight up that, from where you're at, you don't really need to be worried much. If Python works for you, then that's all you need!
With that said, I want to go into further detail about some of the real-world drawbacks of Python specifically:
Python is a functional language, and its object-oriented features are pretty lacking. Missing a
selfparameter isn't very fun, and Python's distinct lack of member/method visibility and method overloading makes classes far less flexible than other languages, and lackingstaticand declared member fields makes class definitions harder to read.Python is dynamically typed, and while there are ways to make functions type-safe, but they make the control flow of functions that need type-safety more complicated and error-prone.
Python doesn't have compile errors or warnings (outside syntax). This really isn't that bad, but it ties up the other points with a neat little bow. Your missing
selfparameter is a runtime error. Passing the wrong type to a function is a runtime error (TypeError). And a linter will probably catch the former, but not the latter, because it's not behavior exposed explicitly in Python.
Anyway, the most important part of this isn't to convince you Python is a bad language. Like any language, it has limitations, and understanding those limitations is important for choosing the right tool for the job.
Python has an active community, more libraries than you can shake a stick at, a phenomenal standard library, and it's being actively developed.
1
u/Oneyeetyboi69 Jun 15 '21
I think Python is a really cool tool to learn coding with. It is kinda simple and easy to understand - in terms of the actual codes and how similar they are to other coding languages. I'm currently testing my abilities with a Text-Based adventure game that is sorta like DnD, and with the new turtle graphics that came out in 3.9, it is really fun. If you want, try it out. Python is also my first coding language, and I'm going to try and learn JavaScript after or HTML, idk
1
1
u/joejunior253 Jun 16 '21
I read somewhere that Python is 2nd best at a lot of things. Like C# might be better at one thing or Java might be better at another. But Python is consistently a good alternative. Not sure what it is ‘best’ at
1
Jun 16 '21
I work in VFX and Ive been coding logic mostly in Python for 10+ years and still am.
I said mostly because there are bits and pieces I do in SQL.
1
u/deletable666 Jun 16 '21
I think you'll find that once you get pretty comfortable with python you'll either
Want to learn more
Have a need that necessitates learning something else, or
Realize learning other languages once knowing python will not be nearly as challenging
1
u/xelf Elf Jun 16 '21
It will be very hard to get a professional job, and not at some point be exposed to something else.
1
u/Potaziiio Jun 16 '21
It all depends on what your trying to do and believe once you get the hang of one programming language it’ll be much easier to understand others (at least core concepts) after you learn some syntax which isn’t very hard
1
u/easyexplain3 Jun 16 '21
When all you have is a hammer, everything looks like a nail. This is the problem with sticking to only one technology/programming language. Even for the simplest projects in production it will be necessary to create things like small bash scripts to glue the pipeline together or something like that. Of course Python is a very diverse language you can utilize to do most of the stuff you are going to do, but having one/two more tricks in your repertoire will safe you sooooo much time and give you a broader perspective of technological stacks that are used nowadays. So in my opinion, python is a really great way to start, but don't get too comfortable with just using python when there are other ways to do something easier/more efficient.
1
u/DonkeyTron42 Jun 15 '21
If Python meets your needs and you're fine with its limitations, then it should be OK. However, Python simplifies a lot of concepts so you'll never gain the level of understanding of core computer science concepts than you would from a language like C.
1
u/JohnRambu Jun 15 '21
Yes you can do that by learning backend AND frontend. Otherwise, learning other programming languages is advised. Learning C to extend Python can be a good opportunity to learn more.
1
-1
134
u/sme272 Jun 15 '21
I'm going to parrot "it depends on what you want to do" the same as everyone else but I'll expand on it a little. Programming languages are tools, and each langage has a selection of tasks that it is well suited for as well as a selection of tasks that it doesn't handle so well. There's nothing wrong with only learning python if it does everything you want it to do, but don't be put off from the idea of learning other languages if they're better suited to the task you're doing. Once you learn one programming language and get a good grasp of programming concepts you'll find learning a second language is much easier, there's a lot of core concepts that are transferable between languages even if the syntax is completely different. For now don't worry about it and if you need something else in the future just learn it then.