So I've been looking @The Defalts python tutorial and it was all going so well until lesson 4: Basic user Input. I figured I must be doing something wrong and then I realised Defalt was using 2.7 and I'm on 3.5. so the print functions have changed. I'm confused on if 2 or 3 is more useful in the context of hacking. I'm new to programming (I wanted to learn programming before pentesting so I'm not a Skid)
But if 3 is being developed in the future and majour 2 developments are no longer on the horizon (according to the wiki) then won't it be better to learn 3
3 Responses
Here you go!
https://wiki.python.org/moin/Python2orPython3
research is the key,my friend.
Also,you are just a beginner no need to worry about "hacking" yet. You'll get it eventually.
To be honest, they are both very similar. If you learn python 2, or 3, you will generally be sufficiently confident in the other(or at least that was the case for me). As for which is more useful, they are both as useful as each other for developing exploits. Personally, for exploits i would recommend ruby because you can make metasploit modules with it.
Python has a rule that all 2.x versions will be backward compatible . The same rule applies to Python 3.x versions. However, Python does not guarantee backward compatibility between versions. Python 3 introduced several changes to the actual structure and syntax of the Python language. The whole Python community was pretty much sceptical when they received Python 3.x. Python 3.0 is fundamentally different to previous Python releases because it is the first Python release that is not compatible with older versions . Most of the things written in Python 2.x were not compatible with Python 3.x, as it did not support backward compatibility. Many applications and frameworks needed to rewritten completely due to this, hence, it was very difficult to port to Python 3.x from Python 2.x . Programmers who first learned to program in Python 2.x sometimes find the new changes difficult to adjust to, but newcomers often find that the new version of the language makes more sense.
Share Your Thoughts