title: mongodb, find -> how to pass a value to a query
body: <p>I have an already created and working mongodb database, and i have already created a collection under it named 'customers'
  Under this collection, i have multiple already inserted dictionaries</p>
  
  <p>I am connecting to it via mongopy via python, and i want to list all dictionaries which 'number' field is equal with my value. The value is not know yet.</p>
  
  <p>one line from my dictionaries: 
  {'_id': ObjectId('5d8641b89d8e8bde6b587693'), 'number': '123562', 'name': 'Viola', 'address': 'Sideway 1633'}</p>
  
  <p>I have a text file, which contains only a number, and i store it into 'recognizednumber'
  I have a different .py which needs to be implemented before i know what kind of value i want to search for. (thats creating the txt and writing a value into it.)</p>
  
  <p>I am reading this number out from the .txt and storing it into "recognizednumber"</p>
  
  <p>I would like to print out all of the dictionary lines from my collection, which 'number' field is matching with my 'recognizednumber' value.</p>
  
  <p>If i printing out for test the recognized number value its showing:</p>
  
  <pre><code>['12352']
  </code></pre>
  
  <p>Unfortunately it does not showing any matched values when printing out the mydoc dictionaries so i assume its there is not a match.</p>
  
  <p>Could someone help please, how do i pass "not known yet" values into a query?</p>
  
  <p>many thanks in advance.</p>
  
  <p>Update::</p>
  
  <p>looks like the problem will be with:
   - when reading from the file, my value if i print out: ['12345']
   - if I manually set a value :   12345</p>
  
  <pre><code>    'define which collection'
      mycol = mydb["customers"]
      'search for recognized number'
      recognizednumber = open(FilePaths.fnRecognized, "r",encoding="UTF8").readlines()
      print(recognizednumber)
  
      myquery = {"number": recognizednumber}
  
      mydoc = mycol.find(myquery)
  
      for x in mydoc:
          print(x)
  </code></pre>