0

How to declare array in python ?

I am very conduced in how to declare an empty array in python and how to update a array values dynamically

26th Jan 2017, 3:04 AM
S.Sakthivel
S.Sakthivel - avatar
1 Answer
0
It depends on how you want to reference the values. Arrays have two versions in python. Lists and dictionaries. Lists take in values and automatically issue an integer key. Dictionaries can take any value but you have to provide a key to reference the value by. That being said there won't be any key collisions in lists but there can be with dictionaries. list = [] dictionary = {}
26th Jan 2017, 3:23 AM
Kevin Gilkey-Graham
Kevin Gilkey-Graham - avatar