  In this paper we prove the scalar curvature extremality and rigidity for a
class of warped product spaces that are possibly degenerate at the two ends.
The leaves of these warped product spaces can be any closed Riemannian
manifolds with nonnegative curvature operators and nonvanishing Euler
characteristics, flat tori, round spheres and their direct products. In
particular, we obtain the scalar curvature extremality and rigidity for certain
degenerate toric bands and also for round spheres with two antipodal points
removed. This answers positively the corresponding questions of Gromov in all
dimensions.
