对于以下列表:
test_list = ['one', 'two','threefour']
如何判断项目是以"三个"开头还是以"四个"结尾?
例如,而不是像这样测试成员资格:
two in test_list
我想像这样测试它:
startswith('three') in test_list.
startswith('three') in test_list
我怎么做到这一点?
python
python ×1