BUG: Updated _pprint_seq to use enumerate instead of next
This PR closes an edge-case [bug](https://github.com/pandas-dev/pandas/issues/16098) that has been around for almost 7 years.

To print a DataFrame, the function `_pprint_seq()` constructs a string representation of an iterable object (called `seq`) by creating an iterator over it, and truncating it if `len(seq) > max_seq_items`.

However, a pandas `DataFrame` is an example of an object where `len(seq)` is _not_ a valid way of checking the length of the iterator. Specifically, `len(df)` returns the number of rows, while `iter(df)` iterates over the columns. When trying to print a DataFrame with more rows than columns, this raises a `StopIterator` exception.

This PR fixes this bug by explicitly iterating over the object, rather than assuming that `len(seq)` is equal to the number of items in the object. The new test `test_nested_dataframe()` raises an exception on `main`, but passes on this branch.

- [x] closes #16098
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests).
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) (no new arguments/methods/functions).
- [x] Added an entry in `doc/source/whatsnew/v3.0.0.rst`.

thx @cliffckerr 