Groups Function In Python Practice