Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Python 2 diff to python 3 Help!

Hello world,

So I am about to grab a book for learning how to use python for "Hacking" I.E. Packet manipulation, exploit building, etc But the book is in python 2 and I know python 3. is there that much of a difference between the 2 and what are the differences? is it to much of a differences that I will not be able to follow along? Thank you for any help you can give me.

-Pr0me3s

I would just like to add. could I follow along in python 3?
Not much difference but you want to be using python2 anyway. Don't use python 3.
I would see this article: https://wiki.python.org/moin/Python2orPython3

Overall, I think it would be better for you to stick with 3 unless you have a specific reason to go back to 2. 2 will be support for a very long time to come but eventually it'll be swept up by the sands of change. In any case, if you're using Linux, you'll have both installed anyway.

There's a lot of differences. I personally find the change too awkward to handle so always return to 2 because I know it. Depends how you feel about that. Of course, you could always buy a reference book for 3 specifically.
(Dec 20, 2015 09:44 AM)Feanor Wrote:  Not much difference but you want to be using python2 anyway. Don't use python 3.

Worst suggestion ive ever fucking seen on this forum
He's not entirely wrong. Larger module support along with simpler syntax, to existing Python users who aren't level-headed and are biased, Python 2 is the superior out of the two.
(Dec 20, 2015 10:44 PM)Socrates Wrote:  Worst suggestion ive ever fucking seen on this forum
That's cute, I bet you learnt python from sentdex and you still use idle.👍
There are small differences, nothing to worry about imo. Example is printing. In python 3 you must surround the string or whatever you're printing with parentheses.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Golang] by SarahRoseLivesJul 30, 2025 04:05 AM 2 134 Jul 30, 2025 04:05 AM
Last Post: SarahRoseLives
[Python] by Bass_ReevesAug 20, 2023 01:44 AM 9 632 Aug 20, 2023 01:44 AM
Last Post: Lucky4L
[Shell] by ImDeepWithWindowsSep 11, 2016 05:08 PM 2 189 Sep 11, 2016 05:08 PM
Last Post: ImDeepWithWindows