FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

inline conditionals




Here is a simple example of how to utilize an inline if statement in your python code

# common way
a=10
if a==10:
b='ten'
else:
b='eleven'

# inline way
b = 'ten' if a==10 else 'eleven'



0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.