【发布时间】:2022-12-27 22:36:17
【问题描述】:
I have a string 'ABCAPITAL23JAN140CE'. This is the symbol for an option traded on stock exchange. ABCAPITAL part of the string is the company name. 23 is year 2023. JAN is for month. 140 is the strike price and CE is the type of the option.
All these components can vary for different options.
I need a function such thatpieces_of_string = splitstring('ABCAPITAL23JAN140CE')
wherepieces_of_string = ['ABCAPITAL', 23, 'JAN', 140, 'CE']is returned
how do I do that?
【问题讨论】: