Walrusing Around
>>> t_s = (8063599, 0) >>> fields = [(t_s := divmod(t_s[0], b))[1] for b in (60, 60, 24, 7)] >>> list(reversed(fields + [t_s[0]])) [13, 2, 7, 53, 19]
>>> t_s = (8063599, 0) >>> fields = [(t_s := divmod(t_s[0], b))[1] for b in (60, 60, 24, 7)] >>> list(reversed(fields + [t_s[0]])) [13, 2, 7, 53, 19]
I've recorded two courses for LinkedIn Learning https://www.linkedin.com/learning/me
Let me emphasize that their production values take a lot of work. While I think I'm a pretty good live presenter, a few days in the recording booth with a producer, reveals all my weaknesses. so. um β¦
more ...Here's a functional programming design pattern I uncovered. This may not be news to you, but it was a surprise to me. It cropped up when looking at something that needs parallelization to reduced the elapsed run time.
Consider this data collection process.
for h in some_high_level_collection(arg1): for l β¦more ...
This can be an interesting exercise. I think it is something that can help people learn to code well. I found this in the LinkedIn Python community: https://www.linkedin.com/groups/25827/.
The Palindrome Problem:
more ...Make a function that makes a palindrome out of the letters in a string β¦
Follow my Patreon: Become a Patron! I'll try to focus on my Building Skills in OO Design book there. I'm thinking of adding some more code examples. Is that a good idea? Maybe that should be the higher-level Patreon benefit?
more ...Tweet:
Real Python(@realpython)
πΊπ Cool New Features in Python 3.8 realpython.com/courses/cool-nβ¦
The Cool New Features in Python 3.8 lists some of the things that could become part of The Modern Python Cookbook 2e. I'm working with Packt on a plan β¦
more ...https://medium.com/capital-one-tech/python-2-remediation-and-problems-at-sea-a58e805d6468 We're about out of time for this effort.
more ...See https://www.patreon.com/posts/30995708 I've (finally) gotten the book content upgraded to Python 3.7. I've also deleted all the previous versions of the book. I had been keeping them on my web server because -- well -- because I don't know why. They go back to at least β¦
more ...Author F. L. Stevens has a hellishly complex (and irregular) spreadsheet with agents, agencies, and query status. (This is how fiction gets marketed: querying agents.) The spreadsheet has become unmanageably complex, with multiple pages. Each page has multiple tables. Buried in this are three "interesting" tables with agent query information β¦
more ...