
Giving life-long learners a low-stress way to hone their #Python skills. 🐍🍪 Write beautiful code. ✨ Made by @treyhunner 💖
Joined January 2018
- Tweets1.5K
- Following5
- Followers6.8K
- Likes58
"When we call this generator function, it doesn't actually run the code in that function!" 🤯 #Python
youtube.com/watch?utm_campai…
"Creating a singleton class might seem a little bit misleading to someone using this class." 😖 #Python
youtube.com/watch?utm_campai…
"The yield statement is what turns a function into a generator function." 🔻 #Python
youtube.com/watch?utm_campai…
"We've exhausted our generator object; we've fully consumed all the items within it." 🏁 #Python
youtube.com/watch?utm_campai…
"For a very simple command-line program, you could just rely on #Python to close the file automatically when your Python program exits."
youtube.com/watch?index=1&li…
The built-in str function actually calls the __str__ method on the object that we give it. #Python
youtube.com/watch?utm_campai…
"A singleton class is a class that only allows creating one instance of itself." 1️⃣ #Python
youtube.com/watch?utm_campai…
"Generator objects will do work as we loop over them." 🔄 #Python
youtube.com/watch?utm_campai…
Python has 4 scopes: local, enclosing, global, and built-ins.
#Python
youtube.com/watch?utm_campai…
"Local variables are defined inside of a function, and they only exist inside that function. The arguments given to a function are an example of local variables." #Python
youtube.com/watch?utm_campai…