Given two lists (a and b), I'd like to replace three elements of list 'a' with three elements of list 'b'. Currently I am using an expression like this:
a[0], a[5], a[7] = b[11], b[99], b[2]
As I need to do such operations very frequently with lots of different arrays I am wondering if there is a more compact solution for this problem (the number of elements I need to replace is always 3 though). I was thinking about something like:
a[0,5,7] = b[11,99,2]
Which obviously does not work.