Fyle interview question

Write Python code to traverse a list and check if the element is present in the list.