import math


def get_distance(dictionary, city1, city2):
    """
    Calculate distance between 2 nodes
    :param dictionary: Dictionary. Dict with node names as keys, coordinates as values
    :param city1: int. Name of city
    :param city2: int. Name of city
    :return: float. Distance from one node to another.
    """
    x = dictionary[city1][0] - dictionary[city2][0]
    y = dictionary[city1][1] - dictionary[city2][1]
    return math.sqrt(x ** 2 + y ** 2)