fork download
  1. text = """Ukraine[a] is a country in Eastern Europe. It is the second-largest country in Europe after Russia, which borders it to the east and northeast.[b] Ukraine also borders Belarus to the north; Poland and Slovakia to the west; Hungary, Romania and Moldova[c] to the southwest; and the Black Sea and the Sea of Azov to the south and southeast.[d] Kyiv is the nation's capital and largest city, followed by Kharkiv, Odesa, and Dnipro. Ukraine's official language is Ukrainian."""
  2. punctuation = ".,;:!?()[]'\"-—"
  3. myset = {ch for ch in text if ch in punctuation}
  4. print("Множина розділових знаків у тексті:")
  5. print(myset)
Success #stdin #stdout 0.09s 14012KB
stdin
Standard input is empty
stdout
Множина розділових знаків у тексті:
{';', ']', '-', ',', "'", '[', '.'}