![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
getopts in python | bio_informatics | Bioinformatics | 3 | 05-02-2014 09:52 AM |
HTSeq for python 3 | schroedj | Bioinformatics | 0 | 07-15-2013 01:38 PM |
Python | marqudiego | General | 4 | 06-30-2013 10:14 PM |
CummeRbund: Error in dat$fpkm + pseudocount : non-numeric argument to binary operator | mebbert | Bioinformatics | 3 | 05-10-2013 02:09 PM |
python | dror | Bioinformatics | 0 | 11-29-2010 03:22 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: San Diego Join Date: Sep 2013
Posts: 78
|
![]()
Dear All,
Is there a ternary operator without else in python foo = "True" if test else "False" is there a way foo = "True" if test == 'True' in python Thanks so much in advance |
![]() |
![]() |
![]() |
#2 |
Devon Ryan
Location: Freiburg, Germany Join Date: Jul 2011
Posts: 3,480
|
![]()
That's the closest you get to a ternary operator in python.
|
![]() |
![]() |
![]() |
#3 |
Junior Member
Location: Bochum, Germany Join Date: Mar 2016
Posts: 2
|
![]()
What about:
Code:
if test: foo = True |
![]() |
![]() |
![]() |
Thread Tools | |
|
|