GroupBy enhancement unifies the return of iterating over GroupBy #42795
- [x] closes #42795 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Applied the deprecation in #47761
Hello @ahmedibrhm! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



















There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2022-07-26 22:07:40 UTC @rhshadrach 
Do you think in changing the behaviour we should change it from its root or only the final result.

What I mean is that when iterating over groupby the `group_keys_seq` variable appear, so do you think we should change the variable itself in case the user passed single element in a list or just change the `iter` function to return the required behavior?
I am asking this because `group_keys_seq` appear in other different functions so it may affect them as well. This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this. @ahmedibrhm are you interested in continuing this PR and applying the deprecation? We are looking to enforce this for the next release Thanks for the pull request, but I believe this was handled by https://github.com/pandas-dev/pandas/pull/50064 so closing. If I misunderstood happy to reopen