I just came into contact with Python. When I used Python to write a crawler today, I suddenly discovered that it does not have a ternary operator, so I thought of some of the previous ways of writing ruby and javascript, which should be possible
1, a = b if true else c
2 , a = b || c