s = "Woooo Wednesday!"
for i in range(len(s)):
    print(i, s[i])
    
###
    
s = "It's a beautiful day in the neighborhood"

result = ""
for i in range(len(s)):
    if s[i] != " ":
        result = result + s[i]
print(result)

###

"""
write a function getPunctuationFrequency(text, punc) that takes a text message
(a string) and a punctuation character (another string) and returns the frequency
of how often that character appears in the text compared to other characters -
the number of times it appears over the total number of characters.

For example, getPunctuationFrequency("That's so exciting!! Good for you man!", "!")
would return ~0.079, because exclamation marks form 3/38 = ~0.079 as a ratio of the
characters in the text.
"""

def getPunctuationFrequency(text, punc):
    count = 0
    length = len(text)
    for i in range(len(text)):
        if text[i] == punc:
            count = count + 1
    return count / length
    
assert(abs(getPunctuationFrequency("That's so exciting!! " +
          "Good for you man!", "!") - 0.079) <= 0.001)

book = """
(add a book's text here)
"""

print(getPunctuationFrequency(book, "."))