print(numbers(29)) needs to be print(numbers[29])
The round brackets (i) are asking the interpreter to call a function with argument iand square brackets [i] is looking for index i in an object with indexes such as a list.
I'm a python newbie and am using The Python Bible 7 in 1 written by Florian Dedov to learn.
I've been doing well but I've hit a barrier with list functions as described in the book and would like help.
I can't figure out how to use the list(element) function in the book it is described as typecasts element into list.
My attempt and error have been as follows
numbers= [10,22,61,29]
print(numbers(29))
which gives me type error 'list' object is not callable
How would you use this function properly?
How would I go about using the list(element) function? How would you use this function?