Skip to content

Instantly share code, notes, and snippets.

@brodycritchlow
Last active September 28, 2021 17:27
Show Gist options
  • Save brodycritchlow/22a46e949bd8eb57195a0f7b80aff52f to your computer and use it in GitHub Desktop.
Save brodycritchlow/22a46e949bd8eb57195a0f7b80aff52f to your computer and use it in GitHub Desktop.

Logo

Python Vanilla Databases (VDA)

Basics

  1. Create A "Database" Variable d= []
  2. Create A Table within the variable d=[ [ ] ]
  3. Create A Datachunk, and data d= [ [ [1,2,3],[4,5,6],[7,8,9] ] ] # Spread out so you can see more clearly
  4. Iterate through database
    • Examples:

      - d[0][0][1]
      - d[0][0][1].split()[0]
      - d[0][1][3]
      - d[1][3][4]
      

More Readable

#database [ #table [ #datachunk [ ] ] ]
c = [ [ [ [1,2,3], [4,5,6] ] ] ]

table= c[0]
dc1 = table[0]

print(dc1[0][0]) # outputs 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment