Extruding from selecting bone head or tail

I want to extrude from the selected bone tail or head I ran this code but it didn’t work. Anyone can help me?
bpy.data.armatures[0].edit_bones[‘Bone’].select_tail = True
bpy.data.armatures[0].edit_bones[‘Bone’].select_head = False
bpy.ops.armature.extrude_move(ARMATURE_OT_extrude={“forked”:False}, TRANSFORM_OT_translate={“value”:(-dis[0], dis[1], dis[2]), “orient_type”:‘GLOBAL’, “orient_matrix”:((1, 0, 0), (0, 1, 0), (0, 0, 1)), “orient_matrix_type”:‘GLOBAL’, “constraint_axis”:(False, False, False), “mirror”:True, “use_proportional_edit”:False, “proportional_edit_falloff”:‘SMOOTH’, “proportional_size”:1, “use_proportional_connected”:False, “use_proportional_projected”:False, “snap”:False, “snap_target”:‘CLOSEST’, “snap_point”:(0, 0, 0), “snap_align”:False, “snap_normal”:(0, 0, 0), “gpencil_strokes”:False, “cursor_transform”:False, “texture_space”:False, “remove_on_cancel”:False, “release_confirm”:False, “use_accurate”:False, “use_automerge_and_split”:False})
bpy.data.armatures[0].edit_bones[‘Bone’].select_tail = False