Easy to understand READABLE Python code
\n\n# Code\n\nclass Solution:\n    def separateDigits(self, nums: List[int]) -> List[int]:\n\n        string_sep = []\n\n        for num in nums:\n            f
\n\n# Code\n```\nclass Solution:\n    def separateDigits(self, nums: List[int]) -> List[int]:\n\n        string_sep = []\n\n        for num in nums:\n            for s in str(num):\n                string_sep.append(int(s))\n\n        return string_sep\n        \n```\nBy using List Comprehension:\n```\nclass Solution:\n    def separateDigits(self, nums: List[int]) -> List[int]:\n        ans = []\n        for num in nums:\n            ans.extend([int(s) for s in str(num)])\n        return ans\n```\nJUST FOR FUN A FEW ONE LINERS:\n\nOne liner using List Comprehension:\n```\nclass Solution:\n    def separateDigits(self, nums: List[int]) -> List[int]:\n        return [int(s) for num in nums for s in str(num)]\n        \n```\nOne liner using itertools.chain:\n```\nclass Solution:\n    def separateDigits(self, nums: List[int]) -> List[int]:\n        return map(int, chain(*map(str, nums)))\n```
['Python3']