Let (d1,d2,…,dn) be a sequence of positive integers with n−1≥d1≥d2≥⋯≥dn. We give a characterization of (d1,d2,…,dn) that is the degree sequence of a graph with cyclomatic number k. This simplifies the characterization of Erdős-Gallai.