def remove_range(file_contents, source_range):
    """
    removes the chars covered by the sourceRange from the file

    :param file_contents: list of lines in the file
    :param source_range:  Source Range
    :return:              list of file contents without specified chars removed
    """
    if not file_contents:
        return []
    newfile = list(file_contents)
    source_range = source_range.expand(file_contents)
    if source_range.start.line == source_range.end.line:
        newfile[source_range.start.line - 1] = newfile[source_range.start.
            line - 1][:source_range.start.column - 1] + newfile[
            source_range.start.line - 1][source_range.end.column:]
        if newfile[source_range.start.line - 1] == '':
            del newfile[source_range.start.line - 1]
    else:
        newfile[source_range.start.line - 1] = newfile[source_range.start.
            line - 1][:source_range.start.column - 1]
        newfile[source_range.end.line - 1] = newfile[source_range.end.line - 1
            ][source_range.end.column:]
        for i in reversed(range(source_range.start.line, source_range.end.
            line - 1)):
            del newfile[i]
        if newfile[source_range.start.line] == '':
            del newfile[source_range.start.line]
        if newfile[source_range.start.line - 1] == '':
            del newfile[source_range.start.line - 1]
    return newfile
