On 2013-08-31 22:00, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
> def merge(a, b):
> if len(a)*len(b) == 0:
> return a+b

Indentation in Python matters; if you're going to post code, you should
probably keep it.

> We have to look at the statement as
>
> v = ((a[0] < b[0] and a) or b).pop(0)

This is short circuit evaluation, which is fairly common in programming
languages.[0]

0: https://en.wikipedia.org/wiki/Short-circuit_evaluation

Attachment: pgpaGypFOdN_q.pgp
Description: PGP signature

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to