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/MaraudingAvenger Feb 20 '21 edited Feb 20 '21

Have you heard of regexpal? Copy a couple of the comments from this thread in, and try to pull out certain strings, or break things into sentences. Check out the docs, specifically things like re.split and re.sub, and play with those using patterns you make on regexpal. Don't worry! Regex has been called a write-only language, lol. You can write it, but it's impossible to read somebody else's.

edit: scroll down on the right side of regexpal for the cheat sheet. the basics are, [stuff] in square brackets matches one of any of the things between the brackets ([abc] will match an a, b, or c). add some curlies after that to say "more than one" ([abc]{2,5} will match between 2 and 5 a, b, or c's -- the 'abc' from 'abcde', or the 'aaaab' from 'aaaabqwerty').

2

u/skinner17 Feb 20 '21

Haven't heard of, thanks for the tip. I'm relatively new to Python (and programming in general), and have been learning completely on my own, so at times this shit makes me question my intelligence and capability to learn. So I really appreciate the help, it really is motivating. Also it's good to hear that Regex isn't generally considered easy to read.

1

u/MaraudingAvenger Feb 23 '21

Regex isn't generally considered easy

Hey, I was watching a YouTube video of a pretty experienced developer messing with some VBS malware, and I thought you might be encouraged with how much he struggles writing regex to select strings in the file :)

starts at 14:50 in the vid - https://youtu.be/3Q9-X_NRlJc?t=1430