Every day is a great day to start learning Python 🐍.

However, the new year is about to start.
Make good use of that extra motivation. πŸ’ͺ

Here is some of my best Python 🐍 content to help you out:
Want to learn about list comprehensions?

I have a comprehensive thread and a free cheatsheet for you.

(πŸ‘† see what I did there? My puns are fantastic!)

Here is the thread:

And here is the link to the free cheatsheet:

mathspp.gumroad.com/l/cheatsheet_l…
I wrote a β€œweird” thread on conditional expressions...

Except that, well, I didn't really *write* much.

The thread has NO words, only code:

If you prefer words, then I have more than 25 Python articles on my blog, that you can read for free (obviously) covering features from vanilla Python:

mathspp.com/blog/pydonts
But I also write about other things.

For example, I shared a small cookbook about the module `pathlib` that you seemed to enjoy:

Similarly, I wrote a nice thread explaining how the new match statement works, the one for structural pattern matching.

I also created a free cheatsheet for structural pattern matching, that you can get from here:

mathspp.gumroad.com/l/cheatsheet_m…
Another thread people seemed to enjoy was a thread on tips to help you name variables in Python:

As another practical tip for all of you, I showed how you can use `itertools.product` to get rid of nested `for` loops:

However, the one piece of content that you seem to have enjoyed the most is the free β€œPydont's” book I published.

mathspp.gumroad.com/l/pydonts

I am very happy about the feedback I have been getting with regards to the book, and I hope it keeps helping many people learn Python.
2022 will be a very interesting year and I am very looking forward to sharing more Python 🐍 knowledge with everyone!

If that's something you are interested in, follow me and stay tuned!

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Rodrigo πŸπŸ“

Rodrigo πŸπŸ“ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @mathsppblog

29 Dec 21
Here is a countdown of my 5 best Python 🐍 articles of the year πŸ‘‡πŸ§΅

How many of them did you read?

mathspp.com/blog
Number 5.

There is my Pydon't article about Python 🐍's pass by value vs pass by reference vs pass by assignment behaviour.

πŸ”— mathspp.com/blog/pydonts/p…
Number 4.

In 4th place is an article that I published less than a month ago, so it's quite cool that it got so much visibility.

It's an article in which I analysis multiple solutions to a programming challenge from Advent of Code.

πŸ”— mathspp.com/blog/advent-of…
Read 7 tweets
25 Nov 21
I enjoy thinking about multiple possible solutions to the same Python 🐍 problems.

I do!

Call me crazy πŸ€ͺ, I don't care!

In the past, I've tweeted simple challenges πŸ†, you tweeted solutions, and I wrote a thread analysing your solutions.

Here is a meta 🧡 of past challenges!
The first challenge I ever posted was to implement the Caesar cipher

This is the thread with the solutions πŸ‘‡

The moral of the story was that very little people know about the `str.maketrans` and `str.translate` methods.

Read 21 tweets
25 Nov 21
Want to boost your Python 🐍 problem-solving skills?

I am looking for highly-motivated individuals that want to stay ahead of the curve!

If that's you, keep on reading πŸ‘‡...

Because tomorrow I'm launching the Python Problem-Solving Bootcamp!
This is a bootcamp focused on writing code.

Throughout the bootcamp you will solve 50 programming puzzles over the course of 25 days.

By going through the puzzles, you'll be practising your Python skills, and writing code is the best way to improve!

But there's more to it.
You will be getting 2 challenges/day.

Does that sound scary?

Good! If it does, then it's because it is an excellent growing opportunity.
Read 13 tweets
21 Nov 21
I have been tweeting about Python 🐍 string formatting.

I have been preaching πŸ™ that f-strings are the best string formatting alternative.

Then comes the string method `.format`.

And only then, %-formatting.

Here is a thread 🧡 comparing the 3 πŸ‘‡
In its most basic form,

πŸ‘‰ %-formatting uses % and a letter inside the string
πŸ‘‰ `.format` replaces sequences of {} with the data
πŸ‘‰ f-strings use {} to insert the data _inside_ the string

Here is how it looks like πŸ‘‡
An undervalued feature of string formatting is that you can easily determine whether your data should be formatted with its string (str) or with its representation (repr).

For debugging, `repr` is usually more useful.

Here is how this looks like πŸ‘‡
Read 10 tweets
6 Nov 21
The Python 🐍 Standard Library is one of the reasons I love πŸ’™ Python.

πŸ“‚πŸ” dealing with your filesystem is super simple.

All you have to do is use the `pathlib` module.

This short thread is a mini `pathlib` cookbook 🍳, showing some example usages of `pathlib`.

Ready πŸš€?
πŸ“‚ Creating a `Path` object

`Path` objects are the bread and butter of `pathlib`.

Here, I just create a path with no arguments, which defaults to the path `.`

Notice how I used `Path` but I get a `WindowsPath` back.

`pathlib` automatically detects your OS πŸ˜‰
πŸ“‚ Getting the parent

The `parent` attribute returns the logical parent of the path you have at hands πŸ‘‡
Read 11 tweets
5 Nov 21
πŸ—“οΈ the weekend is coming πŸ₯³

If you want, use it to rest! You deserve it!

Or, make this a memorable weekend:

Let this be the weekend you implement your first neural network 🧠 from scratch, in Python 🐍

Here's the roadmap πŸ›£οΈ

πŸ‘‡πŸ§΅
By the time you are done, you'll have

πŸ‘‰ a minimal neural network framework
πŸ‘‰ solved a ML problem with accuracy > 90%

And all this with a surprisingly short amount of code!
First, we start with an appetizer.

It will spark your interest, and acquaint you with some terminology.

Your appetizer is this amazing video by @3blue1brown πŸ‘‡

Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(