title: How to find an item in a list (without using "in" method)?
body: <p>I am trying to find an item in a list without using "in" method. I tried to do it using loop. The code executed successfully, but giving collective result for both (item found as well as item not found). I tried to fix it using break statement. It somehow worked. But still not getting result as expected.</p>
  
  <p>The code written in python3.2 is:-</p>
  
  <pre><code>list=[]
  item=""
  while item!='DONE':
      item=input("Enter the number, To discontinue enter 'DONE': ")
  
      if item.isdigit():
          item=int(item)
          list.append(item)
      else:
          list.append(item)
  
  del list[-1]
  print("The list is: ",list)
  
  num=int(input("Enter the number you want to search in list: "))
  def search(list,num):
      for i in range(len(list)):
          if list[i]==num:
              print("Item found")
              break
          else:
              print("Not found")
      return
  search(list,num)
  </code></pre>
  
  <p>Please suggest how I can modify it to search both "integer" as well as "string" type elements. My code is working fine for integer type element.</p>