Ref. stackoverflow.com/questions/12644075/how-to-set-python-variables-to-true-or-false
you set a variable to true or false by assigning True or False to it:
myFirstVar = True
myOtherVar = False
If you have a condition that is basically like this though:
if <condition>:
var = True
else:
var = False
then it is much easier to simply assign the result of the condition directly:
var = <condition>
In your case:
match_var = a == b
'Industry 4.0 > Python' 카테고리의 다른 글
Hands-On Examples for Working with DynamoDB, Boto3, and Python (0) | 2021.04.07 |
---|---|
The right and wrong way to set Python 3 as default on a Mac (0) | 2021.03.31 |
zsh: no matches found: requests[security] (0) | 2021.03.31 |
Getting started with AWS Kinesis using Python (0) | 2021.03.31 |
if…elif…else in Python (0) | 2021.03.31 |
댓글