擅长:python、mysql、java
<p>我的python技能是最强的,但这应该是可行的。我不会说这是最好的实现,但它会起作用。你知道吗</p>
<pre><code> def compare(s1,s2):
if len(s1) == len(s2):
for i in s2:
if i in s1:
continue
else:
print('no')
return;
print('yes')
return;
print('no')
</code></pre>
<p>我删除了另一个,这是我个人的喜好。你知道吗</p>
<pre><code>def compare(s1,s2):
if len(s1) != len(s2):
print('no')
return
for i in s2:
if i not in s1:
print('no')
return
print('yes')
</code></pre>