Python Principles (@PyPrinciples) header
Python Principles (@PyPrinciples) profile picture

Learn #Python programming from scratch through practical exercises.

Joined December 2018
Photo by Python Principles (@PyPrinciples)Photo by Python Principles (@PyPrinciples)Photo by Python Principles (@PyPrinciples)Photo by Python Principles (@PyPrinciples)Photo by Python Principles (@PyPrinciples)Photo by Python Principles (@PyPrinciples)Photo by Python Principles (@PyPrinciples)Photo by Python Principles (@PyPrinciples)
Released #Python #Debugging lessons for beginners. Practice fixing common mistakes, SyntaxError, NameError, etc. Free for a few days. pythonprinciples.com/lessons…
2
4
10
Just learned about \N in #Python to print unicode characters: >>> print("\N{winking face}") 😉
New #Python #programming challenges released: "Thousands separator", "Flatten a list", and "Middle letter". Try them online: pythonprinciples.com/challen…
5
10
Replying to @sirkings555
Even better: pressing ctrl+r.
1
Replying to @PhDemetri
They'll need to know the fundamentals. I'd recommend looking at some beginner books' and courses' contents to enumerate everything, e.g., pythonprinciples.com/lessons… - and less obviously, they'll need to be able to debug at least a little (understand error messages etc.)
1
1
Python Principles retweeted
Hey, that's a neat #python trick!
9
66
6
392
Replying to @Sentdex
Neat trick. You can also use 1e6 or 10**6 to make the integer size instantly clear.
1
If nothing else, you can put the code you write during the courses on github and that'll count for something.
1
Replying to @BiteCodeAI
Remember that sets are unordered, so the result will not have the order of the original list. You can also use a list comprehension: [item for item in list_a if item not in list_b]. Cast list_b to a set and it'll run faster since sets have constant-time lookup.
Replying to @BagHolder1
It has to do with how floating-point numbers are represented at a low level inside your machine. See for example effbot.org/pyfaq/why-are-flo… for a partial explanation and en.wikipedia.org/wiki/Floati… for more info.
2
1
Replying to @python_tip
I've never actually found a use for this. Anyone else?
Ever wondered which #programming language to learn first? #Python is probably your best bet. Here's why: pythonprinciples.com/blog/wh…
5
17
Are you a #programmer looking to move beyond the basics? Do a project! Here's a list of ideas: pythonprinciples.com/blog/pr…
3
1
18
Here's a handy #Python #cheatsheet. It has info about types, terminology, and useful methods. pythonprinciples.com/referen…
5
13
Ever wondered how the #python pros debug code in their head? pythonprinciples.com/blog/de…
4
14
Protip for #python beginners: if you don't know how to start solving a coding exercise, write pseudocode first. Here's a post with an example: pythonprinciples.com/blog/ho…
5
23