x = ['string1','string1','string1']
How do I check that x has type List[str]?
x
List[str]
if type(x) != List[str]: raise ValueError("x should be list of str")
This if condition returns True and raise Error but should not.
True
raise Error
Aucun commentaire:
Enregistrer un commentaire