def as_tuple ( self , value ) : if isinstance ( value , list ) : value = tuple ( value ) return value
change list to tuple in python
Utility function which converts lists to tuples .
def as_tuple(self, value):
        """Utility function which converts lists to tuples."""
        if isinstance(value, list):
            value = tuple(value)
        return value