Hi, so i've got a bit of a general question about abstractions, if i put "return best_value" as the conclusion for instance, go i now have the global variable 'best_value' available? Otherwise, do i need to say, def get_best_value() newVariable = get_best_value() In order to link the output to a variable? I'm working on pset6 at the moment, and with all those definitions flying around i've found myself a little confused. Thanks.
Hey, thanks for that, so this leads to the further question, what if a function has multiple outputs? Is it necessary to us the function to populate a list?
there is only one return statement. if you want to return more than one thing you can put them in a list or a dictionary or a tuple. you can return any type of object. http://dpaste.com/711361/
That's what i thought, i guess returning a dictionary with meaningful keys would be a good way to go. Thanks for the clarification,
Join our real-time social learning platform and learn together with your friends!