我有这个字符串:如何分割这个字符串?
a = "hy what are you doing [Zoho Reports] will you like? [Zoho Books] reply"
,我想分裂它,因此结果是这样的:
hy
what
are
you
doing
[Zoho Reports]
will
you
like?
[Zoho Books]
reply
我怎么能循环,字符串实现这些成果?目前,我正在这样做:
a.split("")
但它分裂了"[Zoho Reports]"
到"[Zoho"
和"Reports]"
,我不想要的。
你的方法有什么问题? – megas
@megas拆分字符串在什么样的基础上取得成果? – Kashiftufail
因为在空间的基础上拆分我如何能够存档“[Zoho Reports]”作为一个单词 – Kashiftufail