Stuck in converting from dict to list