title: To check if an Integer can be divided into a Prime Partition?
body: <p>Python function partition() that takes an integer m as input and returns True if m can be partitioned as primes and False otherwise.</p>
  
  <p>I tried this Code, But this is not working for all test cases!! For Example - with the input of "185" the output should be "False", But This Code returns "True"</p>
  
  <pre><code>def partition(num):
      primelist = primes(num)
      for x in primelist:
          y= num-x
          if y in primelist:
              return True
          else:
              return False
  
  def primes(num):
      primelist=[]
      for i in range(2,num + 1):
          for p in range(2,i):
              if (i % p) != 0:
                  primelist.append(i)
      return primelist
  
  print(partition(185))
  </code></pre>