【发布时间】:2018-08-10 04:18:17
【问题描述】:
我需要检查一个字符串是否包含一组字符,并且它们需要出现正确的次数。
string1 = "somestring"
string2 = "thestrings"
characters = "egimnorsst" # Note that there are two 's' characters here
does_string_contain(string1, characters) # True
does_string_contain(string2, characters) # False
【问题讨论】: