3.4 Group Types - JulTob/Python GitHub Wiki

my_tuple = ("a" , "b", "c")       # data cannot be altered
my_list  = ["a" , "b", "c"]       # data can be altered
my_dict  = {1:"a", 2:"b", 3:"c"}  # index personalized

my_tuple[1]
my_list[1]
my_dict[1]
#  They all work the same way. Smart!


# 2D
table = { "User1": { "ID":10, "Code":12921202, "Country":"FR"},  
          "User2": { "ID":12, "Code":12931222, "Country":"GR"} }
table["User1"]["ID"]
print(table)
for user in table:
  print((user),table[user]["ID"])


# Matrix
matrix = [
  [2,10,2],
  [1,3,22] ]
row = 1
col = 3
print(list[row][col])