Code Signal_练习题_differentSymbolsNaive

Given a string, find the number of different characters in it.

Example

For s = "cabca", the output should be
differentSymbolsNaive(s) = 3.

There are 3 different characters ab and c.

我的解答:

def differentSymbolsNaive(s):
return len(set(s))
一模一样

膜拜大佬

上一篇:Jquary获取页面控件的值


下一篇:Unity UGUI 小知识