A friend of mine and I tried writing some simple functions in python without using any arithmetic operators or numeric literals. It was pretty fun, mostly boiled down to taking the length of lists of empty lists and other objectively cursed things. It was still a fun exercise though and definitely worth trying. I like your approach of using logic operators, although it still seems a little too close to normal addition to me. The log method was really neat and definitely not something I would have thought of.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A friend of mine and I tried writing some simple functions in python without using any arithmetic operators or numeric literals. It was pretty fun, mostly boiled down to taking the length of lists of empty lists and other objectively cursed things. It was still a fun exercise though and definitely worth trying. I like your approach of using logic operators, although it still seems a little too close to normal addition to me. The log method was really neat and definitely not something I would have thought of.