def remove_duplicates(str):
# complete function here...
print(remove_duplicates('banana')) # expected output: 'ban'
print(remove_duplicates('vegetable')) # expected output: 'vegtabl'
print(remove_duplicates('difficulty')) # expected output: 'difculty'
Python
Setting up Python environment...
Output