def len(x):
return x.__len__()
For instance, to evaluate the expression x + y, where x is an instance of a class that has an __add__() method, x.__add__(y) is called.
<input type="text" name="name" value="<?=$_GET['foo']?>" />
<a href="page2.php?id=1">Значение 1</a>
(в данном случае будет передана переменная id)<input type="text" value="<?=GET['id'];?>" />
>>> def f(seq):
... m1 = m2 = None
... for i in seq:
... if m2 is None:
... m2 = i
... elif m1 is None:
... if i > m2:
... m1, m2 = m2, i
... else:
... m1 = i
... elif i > m2:
... m1, m2 = m2, i
... elif i > m1:
... m1 = i
... return (m1, m2)
...
>>> a = [1, 2, 39, 4, 13, 4, 5, 6, 7, 3, 23, 2]
>>>
>>> f(a)
(23, 39)
>>>