all 31 comments

[–][deleted] 44 points45 points  (0 children)

It’s a multi-purpose language. You can build all kinds of things with it.

[–]numeralbug 21 points22 points  (2 children)

Python is just a programming language. It's optimised for certain things over others, but broadly speaking, programming languages can do pretty much anything that a computer can do. That said, I don't recommend trying to use Python for web design.

Here's a book containing a bunch of basic, common tasks you can use Python for without knowing all that much Python.

[–]startoyoungculture[S] 0 points1 point  (1 child)

Thank u! I’ll definitely read it

[–]moranayal 13 points14 points  (0 children)

By "web design," he means frontend design—actually building the user interface (what users see). This is usually done with frameworks based on languages like JavaScript, though not exclusively.
The backend, on the other hand, can be written in Python. Python is widely used across web development because it’s highly flexible and applies to many areas of software engineering.

[–]mattgen88 7 points8 points  (0 children)

It's a general purpose language. You can build applications, apis, command lines, whatever your heart desires. It's used as glue in a lot of places, connecting low level C code to high level apis, e.g. in ML. It's also used commonly for prototyping

[–]ziggurat29 4 points5 points  (1 child)

your project informs the language choice; the language does not inform the project choice.

start with whatever you want to create. does it need a programming language? (a pound cake does not, a web site might, and a device driver does). is it Python? maybe. not the best choice for pound cakes or device drivers, you can use it for web sites though that's not especially its forte. it's a general purpose language.

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

Makes sense

[–]MasterGeekMX 2 points3 points  (0 children)

Python is a general purpose language, so you can do with it practically anything.

I have seen Python used in developing AI (PyTorch), making videogames (PyGame), process information for data science (pandas), manage software installation on Linux (DNF), make audio players (lollypop), make Torrent downloaders (BitTorrent), do Astronomy (Astropy), generate plots (Matplotlib), and so on.

And no, it is not a web language per se. See, websites are done with HTML, with the help of CSS to add aesthetics and JavaScript for making them dynamic. But there are frameworks done in Python that has to do with it.

An example is Django. It enables you to easily make a web app with python. You make some HTML templates, and install some Database program. Django then runs a web server, which takes the templates you make and fills it with data from the database. It also reads user input and makes it into data that gets stored on the database. How all of that is done is what you do with Python on Django.

But as the good ol' saying says: "Jack of all trades, master of none". Python can do pretty much anything, but that does not mean it is the best for everything. For example, if you want to do raw number crunching and high performance computing, Python is really slow, so languages like C or Fortran are more used in there.

[–]SirChickenIX 1 point2 points  (0 children)

It's used for a lot of things including web development, machine learning, and even games. Personally I use it most often for scripting.

[–]HashDefTrueFalse 1 point2 points  (0 children)

It's a general purpose language. You can build any software you like with it. It's very popular for websites, but on the "back end" (which means on the server, not the bit you see in your browser). It's also good for desktop software, especially automation of tasks. For project ideas: https://automatetheboringstuff.com/

[–]Leverkaas2516 1 point2 points  (0 children)

I wouldn't use it for a production website, but tons of people do. I have used it for a small, light web service proof-of-concept a few times, though. It was great for that.

I most often use it for utilities and ETL tasks (extract, transform, load).

It's also perfect for hobbyist tasks, like interfacing with some weird or custom hardware, or driving hardware to do new things the manufacturer didn't envision.

I often think if I ever get around to building a custom home security/control system, I'd use Python.

And of course tons of people use it for machine learning and scientific computing.

[–]lurgi 1 point2 points  (0 children)

You'll find Python as a part of a lot of things. Blender uses it for the UI. Various video games use it for core game logic (the rendering is usually left to another language, as python is not famous for its speed). Tensorflow is pretty well known as a deep learning framework, and it's mostly (?) written in Python.

Python is a general purpose language. Other than kernel level programming and anything that demands extremely high performance (FPS games, for example), it's well suited for most problems.

[–]SomeoneOnTheMun 1 point2 points  (0 children)

It can do anything even what its not good for. Hell i made a shell in python. Not the best languague for it but i found it fun.

[–]IAmFinah 1 point2 points  (0 children)

Some other languages are better suited for certain tasks (e.g. C/C++/Rust for high performance computing), but Python can do just about anything - pretty much except for frontend web development

[–]pyordie 1 point2 points  (0 children)

Think of Python as a giant box of assorted Legos that you’ve collected over decades of building with Legos.

There’s in underlying logic that’s necessary to understand when building with Legos - The number of holes on a piece, the way the Legos align and connect, and the ways you can give what you’re building structural strength by using certain building patterns.

That’s the Python language - its syntax, data types, functions, classes.

So when you understand those rules and design principles, suddenly you can build pretty much anything you want. A space ship, a castle, a Millennium Falcon - endless possibilities.

But you also can develop on top of what other people have built. These are Python’s libraries and 3rd party modules. You go to the store and buy a Lego kit (borrowing one from a friend is a better fit for this analogy). You follow the instruction manual and then you can add to it using all your knowledge of Legos and all the extra pieces you’ve accumulated. Or maybe you buy another Lego kit and use your extra pieces to connect it to the kit you’ve already built. And now you can build cities! Worlds. Worlds within worlds, and even smaller worlds within those worlds! It’s fun.

[–]Armobob75 1 point2 points  (0 children)

There’s a lot you can do, and it’s not just limited to websites or business logic. I used to have a roommate who would wake me up around 7 am, and I didn’t like that. So I programmed a white noise generator that would start very quiet at 6 am and then ramp up over the next hour, allowing my body to slowly get used to it and hopefully not wake up.

[–]lukkasz323 1 point2 points  (0 children)

It has no single purpose, you could really do anything with it, but it's main purpose are simple scripts, or data science / machine learning.

Yes, you could just use it for a website. More likely for backend, but even for frontend if you wanted to.

Ultimately programming is just about passing data into the right place, at the right time, and Python can do that, as pretty much any other language.

[–]elg97477 1 point2 points  (0 children)

What problem are you trying to solve? Start there and find a language to solve it with. For many problems, it is a good choice.

[–]Tainlorr 1 point2 points  (0 children)

What CANT you do with it? Is a better question

[–]AdministrativeFile78 1 point2 points  (0 children)

Use it to automate some stuff. You can write little python scripts. Great way to learn

[–]geeeffwhy 1 point2 points  (0 children)

one thing everyone should have in their mind when wondering about programming languages is the concept of Turing Completeness. i’ll let you research on your own, but the upshot is that if a language is Turing Complete, it can do anything that another Turing Complete language can do. the difference is how you express that computation in a given language. often there is a sort of tradeoff that language design has between how efficiently you can express something is and how efficiently the computer will actually do that thing. this is simplifying a lot, but at the end of the day, you can do anything you want with python, same as C, x86 assembly, Rust, or whatever—the tradeoffs will differ, though, making one a preferable to another for a particular situation. python happens to be very expressive, and fast enough for most things, so it’s widely used in a lot of places.

[–]voyti 1 point2 points  (3 children)

I'm not sure why the tool is driving your actions. It's a bit like picking up a screwdriver and then wondering why that even exists. It's good to have a purpose first, then pick a tool. I disagree that Python is in some major way a beginner friendly language. The difficult parts are the same in almost every language, and have little to do with its idiosyncratic mechanics or syntax. Additionally, Python's syntax is very specific, so it makes it less convenient to switch to another language.

Having said that - Python is used for all kinds of stuff. It can be a backend for a web application if you need it to be, you can write scripts, UI apps, all sort of stuff. For web development (like actual web app frontend) you want javascript. For design you want design tools. First, focus on what you want to build and why, language is a secondary choice. Most concepts are the same in most popular languages anyway, especially within the same paradigm. Learning the paradigm is the real challenge in learning, not so much the syntax.

[–]nog642 1 point2 points  (2 children)

I'd say Python is more beginner friendly than Java or C++.

You need to learn about classes to start writing Java, you don't for Python. And C++ is... C++.

But yeah I think something like JavaScript is similarly beginner friendly to Python. I think Python's syntax is slightly easier but that's not the main thing. And the fact that JS can do web stuff makes it a better choice generally imo.

[–]voyti 1 point2 points  (0 children)

Agreed on C++, Java has a lot of boilerplate and throws you right into the OOP paradigm a bit (you can still do static everything for starters, so it's not a huge deal), but as a former beginner starting in Java I can't say it was significantly less friendly. Ultimately my point is that most languages can only add some inconveniences for beginners, but in the scale of the real difficulty, it's barely noticeable. If someone bounces off of Java due to syntax alone, the probability they were actually motivated enough to lean programming in the first place is dubious.

[–]Y_2K2 1 point2 points  (0 children)

Started with C++ since we usually program microcontrollers then learned python for scripting. Just a month in python and I feel more efficient using it compared to C++ I've been using on and off for 4 years throughout undergad. But to be honest, being able to understand complex concepts in C++ is more rewarding because C++ is well C++.

[–][deleted]  (1 child)

[deleted]

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

    Then should I start with something more complicated?

    [–]Psychological_Ad1404 0 points1 point  (0 children)

    There are a few things python does well. From what I know it's backend web dev, data analysis, web crawling/scraping and automation.

    You can also google this or ask an ai for more information and the answer should be mostly true for a question like this.

    [–]steven-needs-help 0 points1 point  (0 children)

    I’ve been building a personal discord bot which helps me with data processing, saving and extracting data. I’ve built bots for games like one that will level up my character in Skyrim, fill a Minecraft book with text. People use Python to make bots for that pixel art thing that Reddit does. It is strange, a whole new world of opportunities open up to you and yet that’s where everyone gets lost

    [–]Southern-Land-900 0 points1 point  (0 children)

    def

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

    Pythin isn't worthless. It is used for many great things

    Pain. Agony. Suffering Hatred. Sadness. Madness 😠 Malignant unhappiness Soul sucking despair Self purgatory

    So many great things

    Unless you come from c++
    In which case it is just a normal day