hello to all. as they are used lists in game engine. like creating lists and to keep data in them. like erasing its data or changing them of position.
example in code python:
names = [“Francisco”, “leonardo”, “cristian”].
social please aid, or some example:o
thanks for any aid
insert( i, x) Insert an item at a given position. The first argument is the index of the element before which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is equivalent to a.append(x).
An example that uses most of the list methods:
>>> a = [66.25, 333, 333, 1, 1234.5]
>>> print a.count(333), a.count(66.25), a.count('x')
2 1 0
>>> a.insert(2, -1)
>>> a.append(333)
>>> a
[66.25, 333, -1, 333, 1, 1234.5, 333]
>>> a.index(333)
1
>>> a.remove(333)
>>> a
[66.25, -1, 333, 1, 1234.5, 333]
>>> a.reverse()
>>> a
[333, 1234.5, 1, 333, -1, 66.25]
>>> a.sort()
>>> a
[-1, 1, 66.25, 333, 333, 1234.5]
tnanks very much [a]drien.
more information for list here:
http://www.diveintopython.org/native_data_types/lists.html