xavdid,
@xavdid@mastodon.social avatar

Happy 3.12 day! There are a lot of improvements, but my favorite is the arrival of itertools.batched(iterable, n):

> Batch data from the iterable into tuples of length n. The last batch may be shorter than n.

Such a useful function!

docs: https://docs.python.org/3.12/library/itertools.html#itertools.batched

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • ethstaker
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • ngwrru68w68
  • Durango
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • tacticalgear
  • mdbf
  • kavyap
  • khanakhh
  • provamag3
  • osvaldo12
  • GTA5RPClips
  • cubers
  • cisconetworking
  • everett
  • tester
  • modclub
  • megavids
  • Leos
  • normalnudes
  • anitta
  • JUstTest
  • lostlight
  • All magazines