我试着根据我的模式选择中间的单词。下面是我的代码: text = "東京都田中区9-7−4"#Sorry due to the edit problem and stackoverflow doesnt allowcity = re.findall(r,text)
print("getCity: {}".format(city)) 我当前的输出: getCity: ['都田中区'] 我的预期输出: getC
嗨,我是SQL的新手,有一个问题。如果我想从一个表中选择人口小于纽约市的所有城市(纽约市也在表中)。我可以像这样编写代码 SELECT city FROM table where Population <= (select population from table where name = 'NYC') 我的问题是,我是否可以写得更简洁,就像 where city.population < NYC.population