r/learnpython • • Feb 20 '21

What are you having difficulty learning or are currently struggling to learn?

I'm curious what the community here has difficulty with when it comes to learning Python. Partly because I want to see if the more experienced community here (or myself) can help point you into the right direction. . . but also because I'm trying to come up with video tutorial ideas for future content and would love to hear from Python learners what would be most useful to dedicate our time on.

I'm looking forward to hearing what you guys have to say!

417 Upvotes

324 comments sorted by

View all comments

Show parent comments

2

u/pfmiller0 Feb 20 '21

What's the reason for hashing the pages if you are going to store the text of the site anyway? Seems to me you aren't really saving any cycles by hashing the two pages and comparing the hashs versus just comparing the pages directly.

1

u/alfa80211 Feb 20 '21

Was just fear it’s a really big site and maybe takes a long time, but you’re right it’s probably not worth it

2

u/pfmiller0 Feb 21 '21

I'm not certain how python handles string comparisons, but it could be a lot faster than the hashing. If all you need to know is if the strings are different, then as soon as you find a difference you can stop reading. Hashing requires reading each page fully along with the extra math for computing the hash.

1

u/alfa80211 Feb 21 '21

Ok I think that’s fair, I’ll ditch the hash