Skip to content
Advertisement

Trying to append data they show error ‘dict’ object has no attribute ‘append’

They show me error that AttributeError: 'dict' object has no attribute 'append' how to handle these error when trying to append the data I am creating a loop in order to append continuously values from user input to a dictionary but i am getting this error is any method to show solve these error this is page link https://www.nationalhardwareshow.com/en-us/attend/exhibitor-list.html:

JavaScript

Advertisement

Answer

Your issue is that you initialise data as a list and reassign to a dict data structure. Use different variables for different purposes instead:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement