
28.09.2009, 23:43
|
|
Members of Antichat - Level 5
Регистрация: 09.05.2008
Сообщений: 304
С нами:
9477026
Репутация:
2362
|
|
Сообщение от rushter
Как подсчитать количество повторов в тексте ?
т.е например сколько раз встречается слово "да"
Код:
count(...)
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in
string S[start:end]. Optional arguments start and end are interpreted
as in slice notation.
"This is the string".count('is')
__________________
включи голову
|
|
|