* unpacks a list. So if my_list = ["cat", "dog", "bird"] then *my_list would evaluate to "cat", "dog", "bird".
In the code you provided df.columns.tolist() returns a list, then the items are unpacked, extended with the additional items ‘col1’ and ‘col2’, and then all put into a new list (inside the square brackets).
Except that list.extend returns None because it is a method
modifying an object in place (modifies the list). That makes it hard to
embed concisely in an expression as in the OP’s example.