Bill H. answered 05/17/18
Tutor
4.9
(1,365)
Over 20 years of Python programming and 4000 hours of tutoring.
Yes:
x=3 if a=='yes' else 7
This assigns 3 or 7 to x depending on the value of a.