I’m given data that could be either a string or an array. I need to do different operations depending on which one it is, so my question is, how can I tell if an object is an array or a string in Python?
conn = boto.connect_sdb(AWSKey, AWSSecret)
item = conn.get_domain(dName).get_item(imagekey)
tags = item['tag']
tags == array or string?
If by “array” you mean list, then this should suffice:
If you mean array.array instead of a list: