human
Remove recurring digits in a given number | Removes recurring digits in num [ ].
Index in modified string.
Traverse digits of given number one by one.
Copy the first occurrence of new digit.
Remove repeating occurrences of digit.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to remove recurring digits in a given number and the other steps required.
 def removeRecurringDigits ( num ) :
	l = len ( num )
	( i , j ) = ( 0 , 0 )
	str = ' '
	while i < l :
		str += num [ i ]
		j += 1
		while ( i + 1 < l and num [ i ] == num [ i + 1 ] ) :
			i += 1
		i += 1
	return str
if __name__ == ' _ _ main _ _ ' :
	num = '1299888833'
	print ( ' Modified ▁ number ▁ is ▁ { } ' . format ( removeRecurringDigits ( num ) ) )