0
В то время как я бегу следующий код он показывает TypeError
:TypeError поднятый при попытке использовать диапазон
a = int(input("Enter the iteration value:"))
b=[]
for c in range[0,a]:
d=int(input("Enter:"))
b.append(d)
f=0
for e in b:
f = f + e
print f
Он показывает следующее сообщение об ошибке
Enter the iteration value:5
Traceback (most recent call last):
File "/var/app/eclipse/plugins/org.python.pydev_3.5.0.201405201709/pysrc/pydevd.py", line 1845, in <module>
debugger.run(setup['file'], None, None)
File "/var/app/eclipse/plugins/org.python.pydev_3.5.0.201405201709/pysrc/pydevd.py", line 1373, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/opt/odoo/v7.0_cust_mod/Python/print.py", line 68, in <module>
for c in range[0,a]:
TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'