我试图弄清楚Python如何知道如何删除字符串两端的空格。下面是我所指的代码,这是我尝试重新创建条带()函数的第一步:#myStrip.py - I will be recreating the strip function in python在字符串开头查找1或多个空格,然后继续到sub‘in’,或在字符串末尾<em
这是我得到的字符串 这是给定的搅拌 Immunodeficiency with increased immunoglobulin [M] [IgM] Maternal care for anti-D[Rh] antibodies, unspecified trimester 我尝试在Python中查找字符串中一个字符串的多个匹配项,并获取它们的索引。因此,使用输入字符串 char = random input string 我想要这样的结果: result = [[