Sep-15-2020, 01:01 AM
def my_room_light_on(): my_room_l_on = b.set_light([1, 2, 9, 10], 'on', True) my_room_l_off = b.set_light([1, 2, 9, 10], 'on', False) if 'on' in text: my_room_l_on return True elif 'off' in text: my_room_l_off return True return Falsewhat would be the right way to write this i'm trying to return a command that would be in input with out having to make a whole bunch of functions trying to condense them. basically if on is in text I want it to return my_room_l_on if off is in text have it return the off variable.