Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
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