Python 代码阅读合集介绍:为什么不推荐Python初学者直接看项目源码
本篇阅读的代码实现了判断两个字符串是否互为变形词的功能。
本篇阅读的代码片段来自于30-seconds-of-python。
is_anagram
from collections import Counter
def is_anagram(s1, s2):
return Counter(
c.lower()
Python 代码阅读合集介绍:为什么不推荐Python初学者直接看项目源码
本篇阅读的代码实现了判断两个字符串是否互为变形词的功能。
本篇阅读的代码片段来自于30-seconds-of-python。
is_anagram
from collections import Counter
def is_anagram(s1, s2):
return Counter(
c.lower()