def stations_by_river(stations):
    """Creates a dictionary of stations that are located on the same river. The river is the key for this dictionary"""
    river_dictionary = {}
    for i in stations:
        station_list = []
        for j in stations:
            if i.river == j.river:
                station_list.append(j.name)
        river_dictionary[i.river] = station_list
    return river_dictionary