maynul67

remove duplicates from a string

Jul 10th, 2021
570
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. str = "I am inevitable"
  2.  
  3. result = ''
  4.  
  5. for char in str:
  6.     if char not in result:
  7.         result += char
  8.  
  9.  
  10. print(result)
RAW Paste Data