Fix TypeError: can only concatenate list (not "dict_keys") to list on Python 3