def number(n):
    #Input: Number of element (integer)
    """Finds information about element by atomic number, returns information in a list.
    Returns name of element, atomic mass and atomic symbol in a list.
    Average timecomplexity: O(1)"""

    data={}

    with open('elemdata.txt', 'r') as file:
        for line in file:
            value1,value2,key,value3=line.strip().split()
            data[int(key)] = [value1,value2,value3]
    if type(n) is int:
        output=data.get(n)
        if output:
            return(output)
        else:
            raise ValueError('Element does not exist')
    else:
        raise TypeError('Input is not type integer')