Hi Dan,
Thanks for your reply. Please see part of my script below that intends to create the line layer.
#-----------------------------
import arcpy
arcpy.env.overwriteOutput = True
output = "C:\\temp\\line.shp"
createLine = arcpy.CreateFeatureclass_management("in_memory", "createLine", "POLYLINE", "", "DISABLED", "DISABLED", polygon)
cursor = arcpy.da.InsertCursor(createLine, ["SHAPE@"])
#Read the coordinates
x1 = -90.211997
y1 = 32.297159
x2 = -90.211997
y2 = 32.297179
array = arcpy.Array([arcpy.Point(x1, y1), arcpy.Point(x2, y2)])
array_line = arcpy.Polyline(array)
cursor.insertRow((array_line,))
del cursor
arcpy.CopyFeatures_management(createLine, output)
arcpy.Delete_management(createLine)
#-------------------------