tag:blogger.com,1999:blog-7970464356958190643.post6681930085280436544..comments2023-06-17T12:16:20.427+02:00Comments on PySnippet: Ternary operationMariohttp://www.blogger.com/profile/06895806907930156083noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7970464356958190643.post-33402981411070729262010-03-20T06:24:26.779+01:002010-03-20T06:24:26.779+01:00Impressing :) Wouldn't thought of that. Not th...Impressing :) Wouldn't thought of that. Not that easy to read but it works.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7970464356958190643.post-44168167180621385392010-03-19T11:47:19.324+01:002010-03-19T11:47:19.324+01:00I'm a big fan of ternary op too.
I just foole...I'm a big fan of ternary op too.<br /><br />I just fooled around a bit and noticed that following construct does the trick as well:<br />(b, a)[a > b]<br /><br />I won't probably use that anywhere but I thought it might be a fun little oneliner to share. :)Juho Vepsäläinenhttps://www.blogger.com/profile/08481088432274153896noreply@blogger.com