I have 10 vector layers in QGIS. I want to add a field 'City', character varying in each of the layers using python. I have tried to add in a single layer but it is not working.
layer = iface.activeLayer() layer.addAttribute([QgsField('City', text)])
Kindly help.