+ 1

Please how can i pass an integer and a list as function arguments in python

I'm trying todo this Def Poly(X,list): but then when I put Len(list) to get the length of the list,an error messages comes saying that objects of type int don't have lenght

10th Jun 2018, 8:36 PM
Njimukara
5 Respuestas
+ 3
Plus, Njimukara, you'd better not name your variables like datatypes. Now you won't be able to actually cast a list, as your variable has overwritten the list() method :) Try naming it list1, my_list or sth :)
10th Jun 2018, 9:13 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
your list is an int not a list. you need to input values individually then put them in a list
10th Jun 2018, 8:57 PM
VcC
VcC - avatar
10th Jun 2018, 8:52 PM
Njimukara
+ 1
oh,I have seen it. thank you
10th Jun 2018, 9:07 PM
Njimukara
0
ok Kuba,got you
10th Jun 2018, 9:19 PM
Njimukara