So far I've learned a bit about the different types Python posseses and how to print Hello World. Today however, I've learned more about Python's ...
For further actions, you may consider blocking this person and/or reporting abuse
Cool post, neat to see Python concepts explained from a JavaScript perspective. I have a few notes / clarifications on some of your points.
Return vs print: the way it was phrased made it seem like the print statement was similar to the return statement. Itβs not, print is just a function basically equivalent to console.log.
Scopes: you actually can modify global variables from a local scope by using the
global
keyword, like this:These are not meant to be comprehensive tutorials that teach everything about a topic, they're my personal notes that I made into posts. But thanks
Good stuff. Keep going!
Since you're discussing best practices, it's worth noting that functions should have a "docstring". This string appears directly after the function declaration, and is wrapped in triple-quotes.
This docstring can be accessed/inspected via the REPL, is used by IDEs, and is also returned if you call help(your_function).
More: python.org/dev/peps/pep-0257/
Good luck!
I haven't learned that yet. I'm posting and updating as I learn more. For what it's worth, these are notes not tutorials but thank you :)
Really loving this series so far!
As a JS dev I'm very curious about Python too, but before I finally dive into it, here's a suggestion about a future post that might be useful for others like me: it's the WHY of Python. What makes Python more suitable to data science, machine learning or other specific fields compared to JS? What makes the language special in that sense?
day 3?
thanks for updating.
Hi! Im wondering when will you update day 3?? Since I am a real beginner, and would like to join your 100 days activity, hope you will update sooooon><
Hey Mia! I'm really glad you enjoy the series. Aim is to post every few days so it allows me time to edit and add as much info to each post as well as to update old posts too as I'm learning Python.
If you follow me on Twitter @taeluralexis I usually send the link out there as soon as each post is live on dev.
Post #3 comes out on Monday. Post #4 on Wednesday π
I continually forget to use a colon, or I'm so stuck on JS that I use the semicolon! Python is so refreshing as a way to get away from front end webdev/JS.