This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Метод для ввода целочисленного значения | |
/// </summary> | |
/// <param name="isCorrect">Предикат, проверяющий правильность ввода</param> | |
/// <returns>Введённое из консоли число</returns> | |
public static int IntInput(Func<int, bool> isCorrect = null, string msg = null) | |
{ | |
if (msg != null) | |
{ | |
Console.WriteLine(msg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nltk import sent_tokenize, word_tokenize | |
from string import punctuation | |
from collections import defaultdict | |
import operator | |
def count_one_symbol_words(word_list): | |
counter = 0 | |
for word in word_list: | |
if len(word) == 1 and word not in punctuation: | |
counter += 1 |
NewerOlder