I hereby claim:
- I am oddjobz on github.
- I am garethbult (https://keybase.io/garethbult) on keybase.
- I have a public key ASAfLQU2R-hp4nc0VJAkmEAWddglshrNzWIRJFRtKUPIbQo
To claim this, I am signing this object:
def isinarray_str(arr, seq): | |
return str(seq).strip('[]') in str(arr).strip('[]') | |
print(isinarray_str([1,2,3,4,5,6], [3,4])) | |
print(isinarray_str([1,2,3,4,5,6], [3,5])) |
I hereby claim:
To claim this, I am signing this object:
from pynndb import Database | |
db = Database('my-database') | |
people = db.table('people') | |
people.append({'name': 'Fred Bloggs', 'age': 21}) | |
people.append({'name': 'Joe Smith', 'age': 22}) | |
people.append({'name': 'John Doe', 'age': 19}) |
>>> for doc in people.find(): | |
... print(doc) | |
... | |
{'_id': b'58ed69161839fc5e5a57bc35', 'name': 'Fred Bloggs', 'age': 21} | |
{'_id': b'58ed69211839fc5e5a57bc36', 'name': 'Joe Smith', 'age': 22} | |
{'_id': b'58ed69301839fc5e5a57bc37', 'name': 'John Doe', 'age': 19} |
>>> for doc in people.find(): | |
... print('Name: {name:20} Age:{age:3}'.format(**doc)) | |
... | |
Name: Fred Bloggs Age: 21 | |
Name: Joe Smith Age: 22 | |
Name: John Doe Age: 19 |