I have a quick question: I have a MongoDB Database with a collection of dummy data. I used the follwoing code to display all documents within my collection (in this case FlightNo and Terminal):
def getAllFlights():
for x in flightsCol.find({}, {"_id": 0, "number": 1, "terminal": 1}):
print(x)
This works pretty good and the Output looks like that:
{'number': 'XXA54', 'terminal': 'O2'}
{'number': 'LH587', 'terminal': 'PO'}
{'number': 'KLH552', 'terminal': 'LO556'}
{'number': 'LO552', 'terminal': 'H1'}
{'number': 'HHG565', 'terminal': 'H1'}
{'number': 'TRE223', 'terminal': 'LK1'}
{'number': 'JUZ556', 'terminal': 'KL234'}
My question now: How can I display the output as plain text like:
XXA54 O2
Thank you for your help!
Michele