You need to compare ints
with ints
or strs
with strs
.
DOBsrch
is an int
, but DOB
is probably a str
(since you use its split
method).
So you need
day,month,year = map(int, DOB.split("/"))
or, at least
day,month,year = DOB.split("/")
month = int(month)
Also, as @devnull points out, you probably want to compare the month
with DOBsrch
, not DOB
:
if DOBsrch == month: