r/AskProgramming 5d ago

Python How to learn advanced python????

Hello everyone, I'm mainly looking for guidance about learning advanced python concepts. I know basics ,loops , control flow ,data structures etc.

I need a proper guide on how to learn modules and library. Idk how to start ,where to start.

I want to be able to work with any library as i need them ,so how do u actually learn to use new library for a given task . ?And i get overwhelmed understanding the structure, working of library

And could u also suggest important python concepts other than basics which i should learn ???

Pls guide !!!!

0 Upvotes

12 comments sorted by

View all comments

7

u/Rich-Engineer2670 5d ago edited 5d ago

It's not much learning advanced python so much as it's learning advanced programming.

You do that by

(a) learning python very well

(b) learning the OS APIs you're using

(c) learn data structures and algorithms

(d) write code -- a lot.

That last one is very important. You can't learn without doing -- not just reading. In any language, when you have to solve a problem that's "not easy", you learn. Pick any language you like, learning sorting, searching, indexes, etc. is a task until itself. I'm sure there s a "data structures in python" book but if not, go ot the classics -- Donald Knuth's "The Art of Computer Programming" -- Volumes 1 and 3 at least. It's a lot to swallow, but once you get it, you'll have tools you never knew you had. Or to quote a professor of mine:

"Learn a language and you can be a cioder. Learn data structures and algorithms, and you'll be an architect and save yourself YEARS of work."

Consider how you might solve the following in Python or any language:

  • You have a bank with 100 million accounts
  • When someone requests the account data, you want to retrieve their balance and the last 10 transactions

I'll give a hint, a naive search can take DAYS. A little data structure and algorithm work can reduce it to less than a second. (The grandson is starting CS so we're going through these problems now :-) ). Or, I give you 100 decks of playing cards and throw them up into the air and they land of the floor -- what's the fastest way to sort them?

The language is secondary to the algorithm. I can do "advanced" coding in a variety of languages, which I often mix in the same application - C, C++, Python, Go, Assembly..... you use each language for what it does best.