stuff
This commit is contained in:
@ -1,2 +1,15 @@
|
||||
def remove_duplicate(string):
|
||||
pass
|
||||
last = ''
|
||||
dups = ''
|
||||
new_string = ''
|
||||
for char in string:
|
||||
if last == char:
|
||||
dups += char
|
||||
else:
|
||||
new_string += char
|
||||
last = char
|
||||
|
||||
|
||||
return new_string, dups
|
||||
|
||||
print(remove_duplicate("balloons"))
|
Reference in New Issue
Block a user