r/learnpython • u/gunscreeper • Dec 21 '20
What does "have an understanding of basic python" mean?
Sometimes when you wanna take online course on specific python topic like "Web development with Django!" or "Data science with Python", it is recommended that you need a "basic understanding of python". Like what does that mean?
I understand functions, arrays, conditional statements, variables, loops and mathematical operations. But I don't know jack about class, lambda, decorators, etc (I actually don't know how much I don't know). The most complex stuff I did with python was making an animated scatter chart using plotly while heavily relying on tutorials and stuff. Am I considered to have a basic understanding of python?
I wanna learn web development and data science from online courses and I am willing to pay for it if I need to. But I don't know if I'll be able to understand enough to follow the courses
9
u/yerrrrrrp Dec 21 '20
I'd say you're about ready for those courses.
If you had to learn only one thing, learn about classes. There's not much to it: a class basically defines an "object" that can perform several functions (called "methods"). Then you can create instances of that object, and each instance can perform all of those functions. Pretty cool, not too difficult, and likely to show up in data science/ML.
1
u/gunscreeper Dec 21 '20
What abou the stuff that has double underscores? something are they part of lesson for classes?
9
u/Lewistrick Dec 21 '20
Go watch the OOP series by Corey Schafer on YouTube. They're 6 videos of 15 minutes each. They're not extensive but it's all you need to know about classes for now.
Then just dive in the course of your choice. It seems you're afraid of being overwhelmed. Don't be. If it's too hard, you can always quit and start something new that you are able to understand.
For this reason it's good to take free courses. The popular ones are just as good as paid courses.
2
6
u/HezekiahWyman Dec 21 '20
You can certainly get by without lambdas or decorators, but it wouldn't hurt to bone up a bit on basics of classes. You should at minimum understand how to define, instantiate, work with methods and 'self'. There are a lot of modules that utilize OOP and knowing how to work with classes is part of 'basic' Python knowledge.
3
u/gunscreeper Dec 21 '20
The self was one part that I skipped during my self study because it was a bit confusing for me. But I'll try to look it up
3
Dec 21 '20
I say if you look at codes posted in this sub you should be able to make sense of most of them. Not necessarily being able to code all of them on your own as there's many subjects Python covers.
3
u/gunscreeper Dec 21 '20
Most of the codes here are pretty basic tho so most of the time I can understand them. But when I look at Stackoverflow, it's not uncommon that I found the thread with the problem I'm looking for but only to find answers that uses libraries that I never heard
4
Dec 21 '20
Sounds like you're in a good place.
Not knowing libraries is actually very OK. There are tons of libraries and keep in mind that anyone can publish them. As you search for more solution tho you should get familiar with the ones used often. Like itertools, functools, importlib, etc.
Like I only found out about this packages weeks ago for doing specific task (which I've been doing the harder way for years) https://pypi.org/project/reverse-geocode/
29
u/synthphreak Dec 21 '20
Based on your description, I think you are ready. What’s important are that you know
the basic data structures, which you do;
the basics of Python syntax (variable assignment, for/while loops, conditionals, etc.), which you do;
how to use functions, which you do;
most importantly of all for your “can I survive in this course?” case, how to find information that you don’t already have, like if you see something like
np.ndarrayin some code, you know how to figure out where in your scriptnpis defined, and can use that information to search to web for and understand whatnp.ndarrayactually is.
While all four skills are essential for Python coding, the fourth one will pay the greatest dividends, and allow you to “risk” taking courses even if you’re not 100% certain whether you already have all the prerequisite knowledge. In a line, it’s the ability to identify what you don’t know and then quickly figure out how to learn it.
3
u/MrMxylptlyk Dec 21 '20
Yeah I think the best thing to know goibg is the math and the concept. Python you will just learn when you apply the concepts.
4
u/synthphreak Dec 21 '20
I will just clarify that unless you’re doing data analysis or working in an explicitly mathy field like machine learning or computer graphics, most likely you won’t need to “do math” with Python at all (excluding occasionally simple arithmetic like
for i in range(n): x+= 1or whatever).This is a common misunderstanding, that learning to code always requires math proficiency. It doesn’t. Most Python developers probably have no idea what vectorization is, for example.
2
u/selah-uddin Dec 21 '20
it’s the ability to identify what you don’t know and then quickly figure out how to learn it.
thats is not just an ability ... i would go as far as saying that is a superpower that saves the day multiple times a day
55
u/zanfar Dec 21 '20
ecommended that you need a "basic understanding of python". Like what does that mean?
Realistically it means that they aren't going to teach you the basics, so you should already know them, or should be able to find the answers to any basic questions yourself.
To that end, you're probably fine. Just know that there may be concepts which you will need to teach yourself if you don't already have a grasp on them.
7
u/lykwydchykyn Author Dec 21 '20
Came here to say this. There's no hard & fast list of what "Python basics" means, it's all about the focus of the book/tutorial.
35
u/LittleRedPython Dec 21 '20
I would call that a solid understanding of basic python. You’re definitely ready for the types of courses you mentioned
7
u/crazyb14 Dec 21 '20 edited Dec 21 '20
Basics:
Data structures
Operators
Functions
Loops
List/dict comprehensions
Lambda funcs
Inbuilt methods like sort, in,map,reduce etc.(itertools)
Intermediate:
Classes
Operator overloading
Generators, iterator, decorators
Context managers
File handling
Pickling
Multithread/processing (concurrent.futures)
Collections module
Caching
Expert:
I have no clue either.
6
u/chandyego84 Dec 21 '20
Expert is probably being able to think of a relatively big project and knowing how you'll approach it. idfk
6
u/WhiteChili01 Dec 21 '20
Expert: excels at writing one-line code golf that uses every known optimization in the book
5
Dec 21 '20
I understand functions, arrays, conditional statements, variables, loops and mathematical operations.
That's enough for Data Analytics and Data Science or at least to get started.
8
Dec 21 '20
It means that the course is going to introduce you to these libraries by showing you Python code that uses them, so you need to be able to read Python code.
1
u/Rei_Never Dec 21 '20
Please add "writing unit tests" to that list as a basic understanding.
1
u/gunscreeper Dec 21 '20
Could you please explain what do you mean by unit test? ELI5
1
u/Rei_Never Dec 21 '20
A unit test is used to check if a module and or individual classes or functions are fit for purpose.
EDIT: To expand on that - say you have a function that takes an input and multiplies it by 5. Firstly you want to make sure you are getting the output you'd expect but also that you get errors when you pass anything through it thats not a specific type.
1
u/nwagers Dec 21 '20
Unit tests are a method of testing small chunks of code to make sure they work and regression testing. Typically you'll set up unit tests to run on a continuous integration platform so that every time you do a git commit it will run through a ton of unit tests automatically to make sure you didn't break something that was working before. You'd set them up with typical use and edge cases, and probably add tests for reported bugs. I wouldn't include them in "basic understanding" at all.
3
u/LordViaderko Dec 21 '20
I think you still need classes and data structures (at least list and dict) .
2
u/csprogpy Dec 21 '20
"basic understanding" is very low bar. Like even if you don't understand tuples (same here), you could still manage by learning the python you need as you go through the course. So you're learning python while you learn the course. I think going through various online courses that relies on python is actually a good way to master Python. It lets you focus on Python while using that language in all sorts of ways. So, anyways, "basic understanding" just means that the python isn't so heavy that you can just learn it as you take the course.
2
u/mutantsloth Dec 21 '20 edited Dec 21 '20
I’ve been in the same shoes two months ago.. currently trying to finish up CS50W and some courses in Django too. CS50W is great as it gives you a better understanding of how everything ties together but the projects are quite a challenge cause it throws you into the deep end of execution without much guidance I think, so supplementing that with a udemy course will help as you’re trying to do the projects. (You wanna check that any udemy course you’re doing is using Django 3 too tho.. Jose Portilla has one but it’s Django 1/2 and it was quite confusing for me when trying to work in Django 3. There’s one on Django 3 that’s not bad)
I think OOP and classes is quite important cause webdev uses them heavily in models, so maybe I’d look for some resources to brush up on that otherwise you might get a bit lost when it comes to that part. I just went and went thru one or two udemy courses for that too tbh, altho there’re more than enough free resources on that.
I think understanding of things like decorators and lambda expressions etc can be brushed up as you’re going thru the webdev course.
2
2
u/r_734 Dec 21 '20
Thanks for asking this question. I always wondered this. This is a "basic" question about what t.h. "basic understanding" actualy means.
😉
2
Dec 21 '20
Tbh I made sure I had a basic idea of the syntax, and then I jumped in. You will learn Python a lot faster if you are trying to do things with it, like data science and web dev.
Just make sure you know enough about Python to know what to google when things don't work!
2
u/acroporaguardian Dec 21 '20
In my area, they generally ask for r/Python/SAS experience with the assumption that whatever language we use, you will adjust. SAS is going away and unfortunately for me, that is what I built my career on initially.
For Python in my field, its not even applications. Its just reading in data and running some exploratory data analysis and cleaning, basic modeling. The rest they assume you'll catch up with if you can demonstrate statistical expertise because that is far more rare than knowledge of any one specific language.
Really, for statistical modeling they should be able to ask you to build an implement a model in any language, but not necessarily in the interview. They usually give me a choice, they'll say "how would you do it in R, Python, or SAS." If I told him how to do it in C, it wouldn't count against me.
2
Dec 21 '20
Too lazy to go through all the comments and I dont know if someone mentioned this, but if you feel like you dont understand a language you have studied and want some exercises, not just tutorials, then I recommend you to do some Katas on CodeWars, it was very useful for me to polish my skills.
2
u/TheRiverInEgypt Dec 21 '20
As far as I know, all programming languages use pretty much the same scale of when it comes quantifying knowledge/skill level:
basic understanding of python
Knowing the basic rules of syntax & construction
competent understanding of python
Being able to Google things you don’t understand
advanced understanding of python
Knowing that you can Google & identify code written by someone else that does what you want faster & better than you could write it yourself.
expert understanding of python
Being able to Google, identify & repurpose code written by someone else to do what you want faster & better than you could write it yourself.
mastery of python
Being able to recognize when someone else’s code is not only better & faster than yours but reveals a fundamental flaw in how you have approached the project & being able figure out a workaround that doesn’t require scrapping six months of work.
1
1
u/Kriss3d Dec 21 '20
If you are able to read python code and you know how its syntaxes works. Then you have a fair understanding of python.
1
1
Dec 21 '20
functions, arrays, conditional statements, variables, loops and mathematical operations
I'd call this a basic understanding. Maybe add in sets and Dictionaries too.
1
1
Dec 21 '20
I think you need to understand some oop of you want to drive into django. I recommend some classes on classes.
1
1
Dec 21 '20
To me it means understanding flow control, being familiar with common libraries, and how to call methods from those libaries.
1
Dec 21 '20 edited Dec 21 '20
I get asked this fairly often, and I was looking through beginner python books on the official python site and stumbled on this one. I think it does a great job going over the language basics as well as touching on the foundations you'd need for understanding object oriented vs. functional programming paradigms and more advanced concepts: https://python.swaroopch.com/
This would be a good spot to go if you wanted a birds eye view on classes/objects etc. It also can be thought of as a survey of everything you would need to know to be confident that you definitely have a basic understanding of python with two caveats:
(1) This book is thorough and errors on the side of caution with basics. There's nothing in here that you don't need to know, but there might be a few topics that you could ignore until you encountered them. Classes and objects are NOT optional knowledge. Lambdas are a pretty unnecessary feature of the language in my opinion. Decorators are cool, but they're only necessary if you are using a library where it's common to use decorators, and you can probably fake it till you make it on a case by case basis - no need to devote any time to studying them. You would really benefit from looking up "design patterns" which is both a book and a zeitgeist. If you looked up python examples and started to get familiar with design patterns, you will really elevate your programming and help you to understand when, why and how objects should be used.
(2) This book teaches you about vanilla Python the language, not what it's like to actually program in Python. The book doesn't have much content on modules or popular libraries or anything like that. There are certain libraries that every Python dev should know, and you will need to learn them from another source.
1
Dec 21 '20
So for a web course, it means you know the stuff that would be covered in a basic python course. Basic data types, functions, inheritance, etc. I suspect there are some good intro python courses that people here can link (I am currently taking the codeacademy one, which is great, but not free).
Sadly, if you read this phrase in a job posting it could mean anything from "can make a python script" to "can create a project from scratch and support it" and they will not often warn you ahead of time which it is.
1
u/Intelligent_Byte_207 Dec 21 '20
Basic understanding of python is being knowledgeable or confortble using thr basics of python i.e. strings,data types, lists, dictionary, arrays, and etc.
1
1
Dec 21 '20
For the purpose of those courses you know enough, knowing enough to know how to learn whatever basic feature you don't know is also enough.
I work as a Junior Python dev, with Django, and I still have to Google basics occasionally. Or make a really basic test in the console to I dunno, see if this operation made a shallow copy of the list or not or something.
I would say take the plunge, but at your own pace, whenever you feel you're lacking some basic that gets brushed passed to fast, take a break and spend a couple of hours reading up on and testing different usages of that particular feature.
1
1
Dec 21 '20
Understanding how classes are created and how objects and classes work is still in the very basics level. Also lambdas and using functions as parameters belongs to the basics. Some good listings of "basics" you can see in summaries / tables of contents of basic python courses.
The decorators you can learn while you go. That's a topic you'll cover in hour or few, and probably have to rehearse sometimes, which is completely ok - repeating is how we learn. I have found it useful to just learn different niche topics and techniques along the way. Whenever I see something I don't understand, I do a deeper dive on that topic.
1
u/UglyChihuahua Dec 22 '20 edited Dec 22 '20
Here's my opinion.. take the table of contents here:
https://docs.python.org/3/tutorial/
To have a 'basic' understanding of Python you should know how to implement at least 50% of the topics up to Chapter 12 and at least be aware of the existence of the rest of the topics.
And I'd say an 'intermediate' understanding of Python would be able to implement over 90% of those topics + some experience with domain specific packages like Django or Tkinter. Also should be able to use Git at this point.
To say you have 'expert' understanding of Python you should know all that stuff and also advanced topics like how the global interpreter lock works and how that compares to other languages and being aware of all the gotchas for things like late binding and relative imports and have extensive experience with certain packages.
1
u/AuntieSocialist Dec 24 '20
Relax. None of the things you are worried about are really basic. While you would need them to become an accomplished professional Python developer, they aren't expected for "a basic understanding of Python". What the caveat means is that you can look at an example of normal non-tricky Python code and recognize it and either understand or at least be able to infer what it does without being overwhelmed. It's kind of a legal disclaimer - so you don't put nasty comments in the review saying things like "It was impossible to understand! I couldn't follow any of it! It was too advanced! Waaaahh! Waaaahhh! Waaaahhh!"
-5
u/DonkeyTron42 Dec 21 '20
Honestly, it means you've reached the level where you wished you'd learned another language like Java/C++ where classes make sense. Please prove me wrong why Python classes ass-backward constructors and bolted on decorators make sense.
1
u/nwagers Dec 21 '20
I'm not really sure what your beef is here. Python is the 5th language I picked up and you come to realize they're all different and use different paradigms for things. Python is probably the most fun language I've learned because it's bundled with a massive standard library and it's easy to accomplish very high level tasks in just one or two lines of code.
193
u/FLUSH_THE_TRUMP formats with % Dec 21 '20
I’d probably consider a “basic understanding of Python” the core data types (dictionaries/sets/lists/tuples/strings/numbers), the various statements (assignments, conditionals, loops), and function defs.