serhii.net

In the middle of the desert you can say anything you want

21 Dec 2021

Python expanding a list by assigning multiple elements to a slice

Saw this in the python pandoc cookbook1

holder[index:index+1] = split_home(elt)

Wow.

Never thought I could assign multiple elements to a slice!


  1. Cookbook - Pandoc (Python) ↩︎

Nel mezzo del deserto posso dire tutto quello che voglio.