In PHP you use the ===
notation to test for TRUE
or FALSE
distinct from 1
or 0
.
For example if FALSE == 0
returns TRUE
, if FALSE === 0
returns FALSE
. So when doing string searches in base 0 if the position of the substring in question is right at the beginning you get 0
which PHP can distinguish from FALSE
.
Is there a means of doing this in Python?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…