Select Lines by chosing start Z height AND end Z height

Hello, is it possible to help me by showing me a way in order to select random lines that have specific start Z and end Z values ?

A relevant post is this one, but I dont know to separate start and end points, and select lines only with BOTH start Z and end X specific values.

Thank you

If you want to filter all horizontal lines, you can calculate the dot product of the lines and a Z vector. The dot product of a horizontal line is 0, as is the cosine of the angle.

If need to get specific horizontal lines in a certain Z , not all of them, they way you are proposing, I can’t separate them.
By chosing start Z and end Z I think is a good way. No ?

By selecting start Z and end Z someone can get all kind of lines, not only the horizontal ones.