When a warrior wants to talk with another one about peace or war he uses a smartphone.  In one distinct  country warriors who spent all time in training kata not always have enough money. So if they call some number they want to know which operator serves  this number. 

Write a function which **accepts number and return name of operator or string "no info"**, if operator can't be defined. number always looks like 8yyyxxxxxxx, where yyy corresponds to operator.

Here is short list of operators:

* 039 xxx xx xx - Golden Telecom
* 050 xxx xx xx - MTS
* 063 xxx xx xx - Life:)
* 066 xxx xx xx - MTS
* 067 xxx xx xx - Kyivstar
* 068 xxx xx xx - Beeline
* 093 xxx xx xx - Life:)
* 095 xxx xx xx - MTS
* 096 xxx xx xx - Kyivstar
* 097 xxx xx xx - Kyivstar
* 098 xxx xx xx - Kyivstar
* 099 xxx xx xx - MTS Test [Just return "MTS"]

Difficulty: introductory

Starter code:

def detect_operator(num):
	

Solutions:
OPERATORS = {
    '039': 'Golden Telecom', '050': 'MTS', '063': 'Life:)', '066': 'MTS',
    '067': 'Kyivstar', '068': 'Beeline', '093': 'Life:)', '095': 'MTS',
    '096': 'Kyivstar', '097': 'Kyivstar', '098': 'Kyivstar', '099': 'MTS'}


def detect_operator(num):
    return OPERATORS.get(str(num)[1:4], 'no info')


def detect_operator(num):
    operators = {
        "039": "Golden Telecom",
        "050": "MTS",
        "063": "Life:)",
        "066": "MTS",
        "067": "Kyivstar",
        "068": "Beeline",
        "093": "Life:)",
        "095": "MTS",
        "096": "Kyivstar",
        "097": "Kyivstar",
        "098": "Kyivstar",
        "099": "MTS"
        }
    return operators.get(str(num)[1:4],"no info")

OPERATORS = {
    '039': 'Goldem Telecom',
    '050': 'MTS',
    '063': 'Life:)',
    '066': 'MTS',
    '067': 'Kyivstar',
    '068': 'Beeline',
    '093': 'Life:)',
    '095': 'MTS',
    '096': 'Kyivstar',
    '097': 'Kyivstar',
    '098': 'Kyivstar',
    '099': 'MTS'
}


def detect_operator(num):
    try:
        code = str(num)[1:4]
        return OPERATORS[code]
    except KeyError:
        return 'no info'


OPERATORS = {
    '039': 'Goldem Telecom', '050': 'MTS', '063': 'Life:)', '066': 'MTS',
    '067': 'Kyivstar', '068': 'Beeline', '093': 'Life:)', '095': 'MTS',
    '096': 'Kyivstar', '097': 'Kyivstar', '098': 'Kyivstar', '099': 'MTS'}


def detect_operator(num):
    return OPERATORS.get(str(num)[1:4], 'no info')


import re
def detect_operator(num):
    d = {r"0(66|50|9[59])": "MTS",
        r"0[69]3": "Life:)",
        r"0(9[6-8]|67)": "Kyivstar",
        r"068": "Beeline",
        r"039": "Golden Telecom"
        }
    for temp in d:
        if re.fullmatch(temp, num[1:4]):
            return d[temp]
    return "no info"

def detect_operator(num):
    d = {'Golden Telecom': ['039'], 'MTS': ['050', '066', '095', '099'], 'Life:)': ['063', '093'], 
         'Kyivstar': ['067', '096', '097', '098'], 'Beeline': ['068'] }
    return next((k for k in d if num[1: 4] in d[k]), 'no info')

info = {
'039': 'Golden Telecom',
'050': 'MTS',
'063': 'Life:)',
'066': 'MTS',
'067': 'Kyivstar',
'068': 'Beeline',
'093': 'Life:)',
'095': 'MTS',
'096': 'Kyivstar',
'097': 'Kyivstar',
'098': 'Kyivstar',
'099': 'MTS'
}

def detect_operator(num):
  return info.get(str(num)[1:4], 'no info')

operators = {
    "039": "Goldem Telecom",
    "050": "MTS",
    "063": "Life:)",
    "066": "MTS",
    "067": "Kyivstar",
    "068": "Beeline",
    "093": "Life:)",
    "095": "MTS",
    "096": "Kyivstar",
    "097": "Kyivstar",
    "098": "Kyivstar",
    "099": "MTS"
}

def detect_operator(num):
    return operators.get(str(num)[1:4], 'no info')

r = dict(__import__("re").findall(r"(\d{3}).*-\s(.+)",
        """
        039 xxx xx xx - Golden Telecom
        050 xxx xx xx - MTS
        063 xxx xx xx - Life:)
        066 xxx xx xx - MTS
        067 xxx xx xx - Kyivstar
        068 xxx xx xx - Beeline
        093 xxx xx xx - Life:)
        095 xxx xx xx - MTS
        096 xxx xx xx - Kyivstar
        097 xxx xx xx - Kyivstar
        098 xxx xx xx - Kyivstar
        099 xxx xx xx - MTS
        """))
detect_operator = lambda s: r.get(s[1:4], "no info")


import re
def detect_operator(num):
    s = '''    
    039 xxx xx xx - Golden Telecom
    050 xxx xx xx - MTS
    063 xxx xx xx - Life:)
    066 xxx xx xx - MTS
    067 xxx xx xx - Kyivstar
    068 xxx xx xx - Beeline
    093 xxx xx xx - Life:)
    095 xxx xx xx - MTS
    096 xxx xx xx - Kyivstar
    097 xxx xx xx - Kyivstar
    098 xxx xx xx - Kyivstar
    099 xxx xx xx - MTS Test [Just return "MTS"]
'''
    rs = re.findall('0(\d\d).+ - (.*)\n',s)
    rm = re.findall('80(\d\d)\d{7}',num)
    for i in rs:
        if rm[0] in i:
            if 'Test' in i[1]:
                return 'MTS'
            return i[1]
    return 'no info'