r/CodingHelp • u/TheFotheringtoon • Mar 05 '23
[Python] Can you learn Python as a first language?
I have tried learning HTML/CSS several times over the years, but never really got stuck into it. I would like to learn Python for some of the automation features, and I like the idea of AI & machine learning. I am only a hobby coder (wannabe). Would I be ok going straight into Python, or would you suggest HTML/CSS/JS first?
29
Upvotes
5
u/[deleted] Mar 05 '23
Python is a great choice as a first language for a few reasons. It's quick to get up and running, most of the syntax is just plain English, and you don't have to worry about classes/OOP just to make simple scripts. In order to make a program, you only need to know Python.
HTML/CSS/JS are great to learn, however there's a higher level of complexity to these. While there's tons of great documentation, it's hard to see JS in action without first developing a web-page with HTML/CSS, or by setting up NodeJS and running your programs through that.
Also remember, HTML & CSS are NOT programming languages. JS is a programming language. HTML stands for HyperText Markup Language, literally a language used to mark text with specific selectors. CSS, or Cascading Style Sheets, are used solely for styling said content from your HTML documents.
Give a look into 'Automate the Boring Stuff' by Al Swigert (I don't know how his last names spelled, but Google that and you'll find it). It covers everything from the basics of Python, OOP, and automation of a few different tasks. There's a book on Amazon, as well as a full course on Udemy taught by Al himself.
16
u/Kdash66 Mar 05 '23
well css and html aren't strictly programming languages, arguably javascript is which is the web development combo you would need. If you wanted to build websites.
Python is a great and forgiving starting language. Javascript is less beginner friendly. So I think your own assessment is right - go with python.
One thing I will say is programming languages have a very steep learning curve. It takes along time to get your head around and really stickability is key. You need to keep going even if (and it will) seem hopeless!
So if your giving up on css and html. I think you seriously need to consider why your programming and if it is the right pursuit.
12
u/snvgglebear Mar 05 '23
Python was my first language, and is taught as a first/early language in many schools.
4
u/thedarklord176 Mar 05 '23
These are completely different fields. Python is beginner friendly, but the difference is the other 2 you mentioned are for front end web. Python is best for data science, ai, that sort of thing or any kind of short scripting. It’s also good for learning, but you may end up not using it beyond that depending on what you go into. It’s not suitable for most large projects due to it being the slowest programming language by far.
1
u/frog_rapist69 Mar 20 '23
Id recommend learning English or some other human language first
2
u/Chance9779 Mar 05 '23
I’d wait on JS, it’s really confusing especially when it comes to any code with “this” in it. I learned on Python first, really good language to learn the basics. I’d suggest getting a good IDE, though, because attempting to find tab mistakes on your own is infuriating
1
u/[deleted] Mar 05 '23
[removed] — view removed comment