擅长:python、mysql、java
<p>您应该有一个迭代的源列表和一个插入元素的结果列表。你知道吗</p>
<pre><code>source_list = ['-1', '1', '2', '3']
results_list = []
for item in source_list:
# Do some tests, and put items into the results list if you want them.
# I think this is what you want, although I couldn't understand from your question.
if '-' in item:
results_list.append(item)
else:
results_list.append(item + '#')
</code></pre>
<p>如果有其他的要求,那么让我知道,我会尝试调整我的例子。你知道吗</p>