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
import csv | |
import string | |
import itertools | |
import re | |
def count_morse(callsign): | |
# Create a regular expression pattern that matches dots and dashes | |
morse_pattern = re.compile('[.-]+') | |
# Remove any non-alphabetic and non-Morse characters from the callsign |