Simplify chained comparison
It sometimes happen you write code in python like below:
if your_date >= start_date and your_date <= end_date:
pass
You can simplify the code above as below:
if start_date <= issue_date <= end_date:
pass
This kind of comparison is called
chained comparison
in a simplified manner.#python #if #chained_comparison