def getCallingCodes(phoneNumber):
    """
        Returns the calling code for a phone number. () will be removed from calling codes for fixed lines
        Assuming that fixed lines do not have a calling code that is (140)
    """
    if phoneNumber.startswith("140"):
        return "140"
    if (
        phoneNumber.startswith("7")
        or phoneNumber.startswith("8")
        or phoneNumber.startswith("9")
    ):
        return phoneNumber[0:4]

    return phoneNumber[0 : phoneNumber.index(")") + 1]