"Python" easy explanation blackboard
Simple and easy python3 solution\n The approch is well explained in the below image*\n\n\n\n\n\nclass Solution:\n    def canFormArray(self, arr: List[int], piec
* **Simple and easy python3 solution**\n* **The approch is well explained in the below image**\n\n![image](https://assets.leetcode.com/users/images/a91dbf04-3aa3-4126-8899-6dfa59b03345_1609490424.586389.png)\n\n\n```\nclass Solution:\n    def canFormArray(self, arr: List[int], pieces: List[List[int]]) -> bool:\n        keys, ans = {}, []\n        for piece in pieces:\n            keys[piece[0]] = piece\n        for a in arr:\n            if a in keys:\n                ans.extend(keys[a])\n        return \'\'.join(map(str, arr)) == \'\'.join(map(str, ans))\n```
['Python', 'Python3']