Not sure if I really understand the question, but if you just want to check whether the string is literally 's3:*'
, i.e. the *
is not supposed to be some kind of placeholder/wildcard, just use ==
:
if 's3:*' == row['ActionAccess']:
If you are looking for 's3:*'
(but not 's3:*stuff*'
) as part of a larger string, e.g. "some string with s3:* inside"
, then you might use str.split
or resort to a regular expression.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…