Python coding

Hi, I am new to python and i have a simple program to code using basic for / if loop without using any python inbuilt functions. I should write a function which takes an input string and outputs a string from the first occurrence of each element in string… for eg: if i input “mississippi” my output should be “misp”, if input is “abcdefg” then output should be “abcdefg” and so on…basically it should delete all the duplicate elements and return the sequence without repetition.

one way to do this would be to build a list for each character encountered. As you advance through the string you’re checking each one. If the character is in your encountered list, ‘delete’ it and move to the next. If it isn’t, add it and move to the next.