I am fairly new to coding, and as such feel like I've been defaulting to creating large if, elif and else statements. Is there a better way to create the following function? Is there anything wrong with creating large functions like this?
def option_selector(option):
if option == 'Long Call':
return get_graph_value(long_call)
elif option == 'Short Call':
return get_graph_value(short_call)
elif option == 'Long Put':
return get_graph_value(long_put)
elif option == 'Short Put':
return get_graph_value(short_put)
elif option == 'Straddle':
return straddle()
elif option == 'Bull Spread':
return bull_spread()
else: print('No Function')