(test) ? a:b
Tobiah
toby at tobiah.org
Fri Oct 24 13:23:26 EDT 2014
More information about the Python-list mailing list
Fri Oct 24 13:23:26 EDT 2014
- Previous message (by thread): (test) ? a:b
- Next message (by thread): (test) ? a:b
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/22/2014 01:29 AM, ast wrote:
> Hello
>
> Is there in Python something like:
>
> j = (j >= 10) ? 3 : j+1;
>
> as in C language ?
>
> thx
Out of all of the replies, I don't think anyone
actually offered the answer:
a if condition else b
- Previous message (by thread): (test) ? a:b
- Next message (by thread): (test) ? a:b
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list