Python Slices Part 2: The Deep Cut
In this post we take a deeper dive into Python slices, and pull back the curtain on the magic methods behind the slice notation we covered in earlier posts.
In this post we take a deeper dive into Python slices, and pull back the curtain on the magic methods behind the slice notation we covered in earlier posts.
Slices are amazing whenever you want to use a piece of a larger sequence. Learn the basics of slicing in Python and add a powerful tool to your repertoire.
Take a deep dive into Python's rounding functions! Learn about floor, ceil, trunc, and round, and avoid common rounding errors in Python.
Learn about the some less well-known operators in Python: modulo and floor division—as well as how they interact with each other and how they're related!