[Tutor] (2.7.3) Inexplicable change of type

Emile van Sebille emile at fenx.com
Fri Sep 14 14:37:14 CEST 2012


On 9/14/2012 1:43 AM Ray Jones said...
> The code:
<snip>
>          source = source.remove('')
>      return source

To round things out, here's one way to do what I expect you're expecting:

 >>> r=range(10)
 >>> a = r.pop(r.index(4))
 >>> a
4
 >>> r
[0, 1, 2, 3, 5, 6, 7, 8, 9]


Emile








More information about the Tutor mailing list