Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79416

Re: (test) ? a:b

Date 2014-10-22 10:32 +0200
From Jean-Michel Pichavant <jeanmichel@sequans.com>
Subject Re: (test) ? a:b
Newsgroups comp.lang.python
Message-ID <mailman.15056.1413966763.18130.python-list@python.org> (permalink)

Show all headers | View raw


----- Original Message -----
> From: "ast" <nomail@invalid.com>
> To: python-list@python.org
> Sent: Wednesday, 22 October, 2014 10:29:43 AM
> Subject: (test) ? a:b
> 
> Hello
> 
> Is there in Python something like:
> 
> j = (j >= 10) ? 3 : j+1;
> 
> as in C language ?
> 
> thx

j = 3 if j >=10 else j+1

Cheers

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: (test) ? a:b Jean-Michel Pichavant <jeanmichel@sequans.com> - 2014-10-22 10:32 +0200

csiph-web