I have a part of code:
list1.append(list2.pop([0]))
But Python have been printing to me:
TypeError: ‘list’ object cannot be interpreted as an integer
Why, if each list have a string type data? Can it be related with importing lists to finction?
list1: [‘AD’, ‘KC’, ‘QC’]
list2: [‘KH’, ‘QS’, ‘JC’]
5DN1L
#2
If you are trying to remove the first item in list2, and append that item to list1, the code should be:
list1.append(list2.pop(0))
I don’t understand your two questions. Also, did you intend to type “function” instead of “finction”?
Thank you. Yeah, I meaned the function, but it doesn’t matter anymore. I had know my method would not working.