Use of eval() in local program
My suggestion is that you pass functions to move_values_between_cols
instead of strings that need to be evaluated.
For example:
move_values_between_cols('A', lambda value: value is None, ['B','C'], ['D', 'F'])
and inside move_values_between_cols
, check the condition with
if condition(cell.value):
instead of
if eval(condition):