Inverted syntax: Difference between revisions
Content deleted Content added
Tcl doesn't do this |
→{{header|Perl}}: Add Python |
||
Line 16:
unless ($guess = 6) { print "Sorry, your guess was wrong!"; } # Traditional syntax
print 'Huh! You Guessed Wrong!' unless ($guess == 6); # Inverted syntax</lang>
=={{header|Python}}==
<lang python>x = truevalue if condition else falsevalue</lang>
{{omit from|Tcl|The language syntax really doesn't allow this.}}
|