def format_e(n):
    
    """Takes a selected number (float/int) and converts it into scientifc notation.
    
    The number is printed as a string and can be used for calculations, headings, axis labels etc..."""
    
    a = '%E' % n # converts n into scientifc notaion
    return a.split('E')[0].rstrip('0').rstrip('.') + 'E' + a.split('E')[1]