Question: I am executing a stored procedure against a database through a C# application. I would like to do computations after the stored procedure is executed and then after the computations are done, I'd like to roll back the database to its state prior to the stored procedure. Most of the examples I've seen on stack overflow only involve using a rollback in a catch block of a try/catch block in the event of an error, but that's different from what I'm doing.

I'm not sure if I should be saving the state of the database at some point, and then do a transaction roll back with that state, or should be attaching a transaction parameter to the `SqlCommand` instance of the stored procedure, or something else.

Answer: 
You can have 2 lists - one with experienced and one with inexperienced and build whatever lists you need from that, something like:

```
experienced = [worker for worker in mylist if 'y' == worker['experience']]
inexperienced = [worker for worker in mylist if 'n' == worker['experience']]
list1, list2, list3 = map(list, zip(experienced, inexperienced))

```
Try slicing the list of dictionaries into three seperate list

```
list1 = mylist[0:2]
list2 = mylist[2:4]
list3 = mylist[4:6]

```