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


Groups > comp.lang.python > #79416 > unrolled thread

Re: (test) ? a:b

Started byJean-Michel Pichavant <jeanmichel@sequans.com>
First post2014-10-22 10:32 +0200
Last post2014-10-22 10:32 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

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

#79416 — Re: (test) ? a:b

FromJean-Michel Pichavant <jeanmichel@sequans.com>
Date2014-10-22 10:32 +0200
SubjectRe: (test) ? a:b
Message-ID<mailman.15056.1413966763.18130.python-list@python.org>
----- 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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web