python list and dictionnary


JSON:   python list > > > json Array



output / printclass typeusageenter valueread one value

list

Link

['mycsvfile.csv', . . . . ]

type ( )

<class 'list'>

len( )

make list: list( ) constructor

mylist = ["apple", "cherry"]

add value:

mylist.append("orange")

mylist[0]

print( mylist[0:2])

print( mylist[0:len(mylist)])

dictionary
dictionnary
{'key1': 'value1','key2':'value2',. . . }

type ( )

<class 'dict'>



mydict('keyX')