Python provides builtin functions that explicitly convert between data types. This is commonly known as casting. It is often necessary to cast values when they are used as arguments in a function call. It is generally necessary to cast values whenever a function or other process cannot implicitly convert a given variable to the appropriate datatype. For example when storing RGB color as a tuple it may be necessary to alter a single value. The tuple can be converted to a list, have a member altered and converted back to a tuple before using the values in a neopixel object.
list(variable) is used to cast tuples and other sequential types to the list type.
my_tuple = (255, 0, 255)
list(my_tuple)
code.py output:
(255, 0, 255)
[255, 0, 255]