Someone other guy helped me in this but this script is only selecting the end of the cylinder ( if it is closed) not the side edge as I mentioned in the screenshot. It looks like only selecting the 0 degree angle.
What? That's nonsense, of course you can make selections through scripts. For example, this would select edges 0-10 on the mesh named "pSphere1": select -r "pSphere1.e[0:10]" ; You just need to get the name of the mesh you want to make the selection on, the index numbers of the edges you want to select, and combine them…