Gandalf <goldn...@gmail.com> wrote: > other languages like PHP or javascript as this if-else operator like > this > > myVar = checking == 1? 'string': 'other string' > > is this stuff exist in python? > See http://docs.python.org/reference/expressions.html#boolean-operations
conditional_expression ::= or_test ["if" or_test "else" expression] ... The expression x if C else y first evaluates C (not x); if C is true, x is evaluated and its value is returned; otherwise, y is evaluated and its value is returned. -- http://mail.python.org/mailman/listinfo/python-list