# Suggestions for an intermediate+ Python course/tutorial

**URL:** <https://forum.core-electronics.com.au/t/suggestions-for-an-intermediate-python-course-tutorial/15856>\
**Category:** Uncategorized\
**Created:** [9 December 2022 04:26 UTC](https://forum.core-electronics.com.au/t/suggestions-for-an-intermediate-python-course-tutorial/15856 "2022-12-09T04:26:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Steven](https://forum.core-electronics.com.au/u/Steven)\
**Post date:** [9 December 2022 04:26 UTC](https://forum.core-electronics.com.au/t/suggestions-for-an-intermediate-python-course-tutorial/15856/1 "2022-12-09T04:26:28Z")

</div>

I watched a YouTube video the other day along the lines of off “10 things Python beginners do they shouldn’t.” I was guilty of most of them!

I think I’ve got the basics down, I understand the built-in syntax, flow, and can work with imported modules and create my own classes but where do I go to learn more of these advanced things I hear on YouTube: generators, lambda functions, asyncio, etc.

Most of the resources I’ve googled are geared at data science and computation, but I’m coding with things like personal data (e.g. about to try making graphs from fitness records) and maker-style electronics projects like we see here.

TLDR; I want to understand some more advanced Python features, and make my code more elegant, “Pythonic” and efficient.

---

<div class="post-metadata">

**Author:** ![Liam120347](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam120347/32/5003_2.png) [@Liam120347](https://forum.core-electronics.com.au/u/Liam120347)\
**Post date:** [9 December 2022 06:55 UTC](https://forum.core-electronics.com.au/t/suggestions-for-an-intermediate-python-course-tutorial/15856/2 "2022-12-09T06:55:09Z")

</div>

Hi Steven!

Great post!

I stumble across most of these features through necessity from project to project, for standout methods I like to write them down so I don’t forget - also I tend to spot them a lot in reverse engineering other people’s code and in other forums/projects such as StackOverflow and occasionally places like [W3Schools](https://www.w3schools.com/python/default.asp) (Other peoples code is amazing for learning, I’ve ethically acquired a few techniques from @James46717 over the years 😉 )

If something does interest you usually there are tutorials around, some better than others - [Core](https://core-electronics.com.au/courses/), [Digikey](https://www.digikey.com.au/en/maker/projects/raspberry-pi-pico-and-rp2040-micropython-part-3-pio/3079f9f9522743d09bb65997642e0831), Adafruit, Unexpected Maker have some amazing ones that I watch for revision.  
And as always if you have questions feel free to pop a post up the forum asking for a hand 🙂

On the flip side some of the more ‘advanced’ features can obscurify the workings of a bit of code…  
For example this function inside of the HomeStation code…

```auto
    def sensDict2Vals(self,sensorDict):
        sensOut = {}
        for i,j in sensorDict.items():
            if callable(j):
                sensOut[i]=j()
            elif type(j) == type([]):
                sensOut[i] = sensorDict.get('.'+j[0])()[j[1]]
        return sensOut

```

Very abstracted and not very pythonic but memory efficient for Micropython’s sake.

---

<div class="post-metadata">

**Author:** ![Trent5487676](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/trent5487676/32/4583_2.png) [@Trent5487676](https://forum.core-electronics.com.au/u/Trent5487676)\
**Post date:** [12 December 2022 01:03 UTC](https://forum.core-electronics.com.au/t/suggestions-for-an-intermediate-python-course-tutorial/15856/3 "2022-12-12T01:03:16Z")

</div>

Hi Steven,

I haven’t used it for python but I agree with @Liam120347’s recommendation of using W3schools resources. Personally, I find them to be the right balance of complexity for learners but also have great reference documentation if you need to know the best practice.
