Changing a string category into a boolean 1,0

Hi guys, maybe it is not the place, but I did not find any particular source really helpful to help me with this.

I have a variable which return days, my condition is if days < 60 then “paid” elseif “not paid”, how to program this in python ?
Any help here will be appreciated


Your question is a little bit weird… Your subject says you want to change a string into a boolean while the text talks about a condition that translates to a string. And you want a number of days to translate to “paid” or “not paid”?!? That doesn’t make much sense to me.

The Python keyword for “else if” or “elseif” is “elif”.

Yes, my bad
You could say actually that ‘not_paid’ == 1 and ‘paid’ == 0