0

The question is not about an empty list like this one
e.g. I have an object which could be either list or None
I find a way to create a list from it like

maybe_list = _get_list_or_none()
maybe_list = maybe_list if maybe_list else []

Maybe you can help me to find a more natural and idiomatic way to do it

Pizza eu
  • 1,419
  • 1
  • 14
  • 27

0 Answers0