Skip to content

Instantly share code, notes, and snippets.

@JustAyush
Created June 19, 2019 14:44
Show Gist options
  • Save JustAyush/57a216240314214fc78ae57de8fc8a51 to your computer and use it in GitHub Desktop.
Save JustAyush/57a216240314214fc78ae57de8fc8a51 to your computer and use it in GitHub Desktop.
# get isFifteen (True or False)
x=mycol.find({"user_id":123,"isFifteen":1})
isFifteen=x.count()
if isFifteen == True:
send 15 books recommendation
You may have to edit the query a bit as if it is being used for try now.
else:
send random books
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment