I found the timeline_markers function to add markers in the timeline like:
import bpy
scene = bpy.data.scenes['Scene']
scene.timeline_markers.new('F_01', frame=1)
but I can't find the similar function deal with sequence editor
I found the timeline_markers function to add markers in the timeline like:
import bpy
scene = bpy.data.scenes['Scene']
scene.timeline_markers.new('F_01', frame=1)
but I can't find the similar function deal with sequence editor
Like Lemon said, the Video Sequence Editor and the Timeline Editor share the same markers. So, your code from above should work for the VSE.
If you need more details about how to create a script; see https://vse-docs.readthedocs.io/extra-tools/python/scripting-workspace.html#how-to-use-the-script-editor-efficiently