return my_dict.items()
Will return a list of your objects, but if you just need the values they contain, then yes, my_dict.values()
will work, and you shouldn’t need to wrap it in a list.
return my_dict.values()
return my_dict.items()
Will return a list of your objects, but if you just need the values they contain, then yes, my_dict.values()
will work, and you shouldn’t need to wrap it in a list.
return my_dict.values()