
def best_stock(data):
    mx = max(data.values())
    key = ''
    for k, v in data.items():
        if v == mx:
            key = k
            break
    return key

if __name__ == '__main__':
    ex1 = best_stock({ 'CAC': 10.0, 'ATX': 390.2, 'WIG': 1.2 }) # 'ATX', "First"
    print(ex1)
    ex2 = best_stock({ 'CAC': 91.1, 'ATX': 1.01, 'TASI': 120.9 }) # 'TASI', "Second"
    print(ex2)

3e7ca4e8b400fec2286e3d659eb7ca50f76df771
<mask token>

def best_stock(data):
    mx = max(data.values())
    key = ''
    for k, v in data.items():
        if v == mx:
            key = k
            break
    return key


<mask token>

def best_stock(data):
    mx = max(data.values())
    key = ''
    for k, v in data.items():
        if v == mx:
            key = k
            break
    return key


if __name__ == '__main__':
    ex1 = best_stock({'CAC': 10.0, 'ATX': 390.2, 'WIG': 1.2})
    print(ex1)
    ex2 = best_stock({'CAC': 91.1, 'ATX': 1.01, 'TASI': 120.9})
    print(ex2)


def best_stock(data):
    mx = max(data.values())
    key = ''
    for k, v in data.items():
        if v == mx:
            key = k
            break
    return key

if __name__ == '__main__':
    ex1 = best_stock({ 'CAC': 10.0, 'ATX': 390.2, 'WIG': 1.2 }) # 'ATX', "First"
    print(ex1)
    ex2 = best_stock({ 'CAC': 91.1, 'ATX': 1.01, 'TASI': 120.9 }) # 'TASI', "Second"
    print(ex2)
