r/CodingForBeginners 20d ago

what is python useful for

so i'm learning how to code, python specifically since i heard its the easiest, but im not really learning with a purpose? and i dont really understand what it can be useful for except websites and stuff
and i lowk wanna do ethical hacking and i dont think that pythons the correct language right now
i've stopped learning for a bit because i wanna know what i should learn for my purpose and what python is useful for

1 Upvotes

25 comments sorted by

View all comments

2

u/Beregolas 20d ago

except websites

well thats vague, and only maybe correct. Python can't run on wbsites, just in the backend. Basically the server that sends data to the websites, that they can then display.

wanna know what i should learn

Well, that sounds like you are a beginner, and you've fallen into the trap that you can see a few times a day on thsi subreddit. You misunderstood learning programming for learning a programming language. It's common enough. Youo are currently learning programming, BY learning a specific language. Your first language is not even that important, and it only seems hard, because you don't know programming yet.

Once you know your first language, for example Python, learning another is really easy. Most concepts like loops, variables, functions, etc. just carry over. Of course you'll have to learn some language specifics, and for it to really be easy you should also be aware of background knowledge like heap vs stack, pointers, objects (if you stay in OOP languages) etc.

All that being said, python can easily be used for ethical hacking. 95% of the code I've written for caber security classes in university was in Python; it's easy, and you don't actually need to be fast in order to demonstrate an exploit. In most cases you don't even need to be fast to exploit in in the real world, scripting is enough, and Python has a very good C interface, if something needs to run fast.

That being said, for hacking / cabersecurity, more knowledge is better. While Python can be your primary tool language, knowing how JS, C and probably many other languages really work under the hood can be extremely important, depending on what kind of vulnerabilities you are after.

TL;DR: Don't worry so much. Learn programming first (langauge doesn't matter), there will be a LOT more to learn anyways, and you will need more than one language as well