重複の可能性:
Python の三項条件演算子
私はこの問題を抱えており、Googleにこれを尋ねる考えがありません:
(value == 'ok') ? 'ok' : 'not ok'
私はその文法を意味します:
(expression) ? (return if <expresion> is true) : (return this value if <expresion> is false
重複の可能性:
Python の三項条件演算子
私はこの問題を抱えており、Googleにこれを尋ねる考えがありません:
(value == 'ok') ? 'ok' : 'not ok'
私はその文法を意味します:
(expression) ? (return if <expresion> is true) : (return this value if <expresion> is false