title: A Python Program to find the largest odd occurring number in a list
body: <p>I wrote this code but it is returning none in a couple of parameters...</p>
  
  <pre><code>def duplicates(list,item):
      return [i for i, x in enumerate(list) if x == item]
  
  def largest_odd_times(L):
  
      count=0
      temp=0
      largest=0
      for n in L:
          if n&gt;largest:
              largest=n
      for a in L:
          if a==largest:
              count+=1
      if count%2==0:
          for k in duplicates(L,largest):
              L.remove(largest)
              if L is None:
                  break
              else:
                  largest_odd_times(L)
  
      else:        
          return largest
  </code></pre>