擅长:python、mysql、java
<p>保留您创建的结构并仅更改最少的代码量,您可以执行以下操作:</p>
<pre><code>def no_capitals(string):
#result as a string
result = ''
for char in string:
#if the character is not uppercase add it to the end of result
if not char.isupper(): result += char
return (result)
print(no_capitals("X007XK"))
print(no_capitals("Xmen R cute"))
</code></pre>
<p>现在给出:</p>
<pre><code>007
men cute
</code></pre>
<p>注意:在男人和可爱之间有两个空格</p>