Python — Basic Review before diving deeper 10
Want to recall the memory of Python easily?
This is the note taken when I learned Python “again”, hope it helps you too.
There are additional links in the article for you to understand further information.
BTW. I just start my journey with break-the-ice-with-python ☃️🔥
💠My solutions are here
Quick tip |
Find ⚡ for each topic
☘️Directory
🔹Modules
🔹Built-in Modules
🔹pip install
🔹debug
🔹file path
❤️Good Resources
⚡Modules
More in W3Schools
More in RealPython
🔹A file contains functions
🔹like a code library
🔹Syntax — from <module_name> import <name(s)>
⚡Built-in Modules
More in Python Doc
🔸sys.argv
🔸random
Example in W3Schools
We have seen this before.
🔸collections
🔹Counter
🔹defaultdict
🔹OrderDict
⚡Guess a number
Exercise 12
🔸What if we use sys.argv?
Make sure you try it in the machine instead of replit online.
Get Yen Wang’s stories in your inbox
Join Medium for free to get updates from this writer.
sys.argv doesn’t work for the website.
⚡File I/O
🔸File
🔸Read, write & append
🔹mode = ‘ r ‘
🔹mode = ‘ r+ ‘
🔹write
🔹mode = ‘w’
This will overwrite all the file.
🔹Create a new file









