Or, Select 2 Edge Loops like so:

Then P > Separate By Selection.
Connect the 2 Circles of the newly created Object (use V to Rip Vertices apart, F to Fill:

Then you can turn that into a Curve, if t you want, or just Extrude (in my case on the X-Axis), Add a Solidify and maybe a Bevel Modifier to get the result you want:
