def consecutive_duplicates(nums):
    from itertools import groupby
    
    return [key for key, group in groupby(nums)] 
def consecutive_duplicates(nums):
    from itertools import groupby
   
    return [G59 for G59, group in groupby(nums)]