I was solving a problem in python by using following code:
T = int(raw_input())
C=[]
for x in range(T):
C[x]=int(raw_input())
res=[]
for x in range(T):
res[x]=2**C[x]+2*C-1
for x in range(T):
print "%d\n",(res[x])
and this error came up:
Traceback (most recent call last):
File "C:\Users\ACER\Documents\works\source code\python practice\Test1.py", line 4, in <module>
C[x]=int(raw_input())
IndexError: list assignment index out of range
Can any solve this error pls