13,721 questions
Hi
If I understood correct , you want to create 2 array of length 26 and assigned the value 1 individually in array ch1 and ch2 , and you want to sum all the element of array and then add both array , right?
Equivalent Python code:
from array import *
ch1 =array('i',[])
ch2 =array('i',[])
for i in range(26)
ch1.append(1)
for i in range(26)
ch2.append(1)
print(sum(ch1)+sum(ch2))
Let me know if you have any doubt ?