Feb-14-2019, 04:25 AM
i have some incoming data. each unit of data can be converted to a list. that list can be converted back to that data. the conversions are expressions. i can nest these two expression to convert the data to a list and then back. i have a modification to the data that is defined in terms of it being in the list form. the modification is copying element index B to element index A of the list like. i can do this in 3 lines:
temp = convert_data_to_list(data) temp[A] = temp[B] data = convert_list_to_data(temp)is there an easy way to use slicing (or something else) to make this all be a single expression?