dict.setdefault('Name','').str('Name 1')
I want to append 'Name' to the dictionary directly in a for loop and if the name is not available, I want it to be an empty string. Can we get this using setdefault?
When I use the above code, I get error as -
AttributeError: 'str' object has no attribute 'str'