im trying to pass the address of an array reg_value[2]
to a function in python
import array
reg_value = array.array('I',[0]*100)
def postdata(data):
for i in range(2):
print(data[i])
reg_value[0]=1
reg_value[1]=2
reg_value[2]=3
reg_value[3]=4
postdata(reg_value)
the above code prints the value 1 2
but i need to pass the address of reg_value[2]
to print the value 3 4
i can achieve this in C programming like passing the address as ®_value[2]
how to replicate the same in python?