def equationTemplate(v): a,b,c,d = v return a*b*c==d or a*b==c*d or a==b*c*d or b*c*d==a or b*c==d*a or b==c*d*a or c*d*a==b or c*d==a*b or c==d*a*b or d*a*b==c or d*a==b*c or d==a*b*c or a*c==b*d print(equationTemplate([2, 3, 6, 4]))
Standard input is empty
True
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!