The code provided is supposed replace all the dots `.` in the specified String `str` with dashes `-`
But it's not working properly.
# Task
Fix the bug so we can all go home early.
# Notes
String `str` will never be null.
def replace_dots(str):
    output = ""
    for element in str:
        if element == ".":
            output += "-"
        else:
            output += element
    return output            
def replace_dots(str):
    output = ""
    for element in str:
        if element == ".":
            output += "-"
        else:
            output += element
    return output            