def convert_lon(lon):
    """Convert a single longitude value to a floating point number.

    Input longitude can be string or float and in 
      -135, 135W, 225 or 225E format. 

    Output longitude lies in the range 0 <= lon <= 360.

    """

    lon = str(lon)
    
    if 'W' in lon:
        deg_east = 360 - float(lon[:-1]) 
    elif 'E' in lon:
        deg_east = float(lon[:-1])
    elif float(lon) < 0.0:
        deg_east = 360 + float(lon)
    else: 
        deg_east = float(lon)
    
    assert 0 <= deg_east <= 360, "Longitude must lie between 0-360E"
    
    return deg_east