Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python conditional assignment

number = 10
message = "is 10" if number == 10  else "is not 10"

print(message)
# output: "is 10"
 
PREVIOUS NEXT
Tagged: #python #conditional #assignment
ADD COMMENT
Topic
Name
2+7 =