Python uses list as the variable name, and using type to judge whether a list is a list will be invalid
編輯:Python
list = ['1', '2', '3', '4', '5']
lis=[]
print(type(lis)==list)
Output : False
When used list As a variable name , use type It is invalid to judge whether it is a list , Change to judge whether or not and list This list is equal .