first you need to convert integer
to string
after that you also have an error when concatenate
b +","+your_list[i][1]+","+your_list[i][2]
you need to convert also your_list[i][1]
to str because it raise an TypeError: must be str, not int
Error because we can concatenate str + int
your_list=[[1010 ,2,3],[1010 ,7,8]]
b = []
c = []
d = []
for i in range(1,2):
b = str(your_list[i][0])
b = b.replace('1010','')
print(b)
c = b +","+str(your_list[i][1])+","+str(your_list[i][2])
c = c.split(",")
d.append(c)
1
solved AttributeError: ‘int’ object has no attribute ‘replace’ while printing [closed]