Генерация нескольких случайных чисел, равных значению в python с ограничениями

def count_substring(string, sub_string):
count=0
for pos in range(len(string)):
    if string[pos:].startswith(sub_string):
        count+=1
return count

Это может быть самым простым способом.

0
задан user11151416 5 March 2019 в 04:21
поделиться