Question: I have an app in which the main view is a `PopupWindow` with a couple of `ImageViews` and an `EditText` on top of them. My problem is when I enter a very long text and the text box expands down and pushing the image views out of the view and I can't see them, and in order to see them back I need to delete some text.

What is the proper way of overcoming this?

thanks.

Answer: 
This can probably best be shown:

```
>>> a = [1, 2, 3]
>>> id(a)
45556280
>>> del a[:]
>>> id(a)
45556280
>>> b = [4, 5, 6]
>>> id(b)
45556680
>>> b = []
>>> id(b)
45556320

```

When you do `a[:]` you are referring to all elements within the list "assigned" to `a`. The `del` statement removes references to objects. So, doing `del a[:]` is saying "remove all references to objects from within the list assigned to `a`". The list itself has not changed. We can see this with the id function, which gives us a number representing an object in memory. The id of the list before using `del` and after remains the same, indicating the same list object is assigned to `a`.

On the other hand, when we assign a non-empty list to `b` and then assign a new *empty* list to `b`, the id changes. This is because we have actually moved the `b` reference from the existing `[4, 5, 6]` list to the new `[]` list.

Beyond just the identity of the objects you are dealing with, there are other things to be aware of:

```
>>> a = [1, 2, 3]
>>> b = a
>>> del a[:]
>>> print a
[]
>>> print b
[]

```

Both `b` and `a` refer to the same list. Removing the elements from the `a` list without changing the list itself mutates the list in place. As `b` references the same object, we see the same result there. If you did `a = []` instead, then `a` will refer to a new empty list while `b` continues to reference the `[1, 2, 3]` list.
Well, del uses just a little less space in the computer as the person above me implied. The computer still accepts the variable as the same code, except with a different value. However, when you variable is assigned something else, the computer assigns a completely different code ID to it in order to account for the change in memory required.