When you have a variable (say, a dict) which is set by a method, what is Python's best practices recommendations:
Should I initialise my_var first:
my_var = {}
my_var = do_something_and_return_var()
or set it straight away:
my_var = do_something_and_return_var()
The advantage of setting it first is that you can tell staight away what type my_var should be (and although I don't use an IDE, I guess it could help when you do). But on the other hand it my seem a bit useless to set it to an emtpy dict right before you set it to it's actual value.
Thanks

my_var = do_something_and_return_var(), you could always add a type hint