python3 solution
Solution, requires a bit of observation\n\n\nclass Solution:\n    def numPermsDISequence(self, s: str) -> int:\n        myStore = [1]\n        \n        for ind
Solution, requires a bit of observation\n\n```\nclass Solution:\n    def numPermsDISequence(self, s: str) -> int:\n        myStore = [1]\n        \n        for index, val in enumerate(s):\n            if val == 0:\n                continue\n            temp = []\n            for i in range(index + 2):\n                if val == "I":\n                    curr = sum(myStore[i:])\n                else:\n                    curr = sum(myStore[:i])\n                temp.append(curr)\n            myStore = temp\n        return sum(myStore) % (10**9+7)\n```\n
['Python3']