Question: First of all , I clarified with my hosting company and they have verified that Allow Override setting is enabled.

Second if I write garbage value in .htaccess file, then I get "Internal Server Error" which further proves that .htaccess is not skipped.

I am trying to do this
Input : all/3
output: all.php?id=3

I wrote following in .htaccess file, which I copied from a tutorial site.

```
# Enable Rewriting  
RewriteEngine on  
# Rewrite user URLs  
#   Input:  user/NAME/  
#   Output: user.php?id=NAME  
RewriteRule ^all/(\w+)/?$ all.php?id=$1

```

all.php file

```
<?php
echo $_GET['id'];
?>

```

Now if I enter `localhost/all/3` then I get 3 displayed.

If i enter `www.mydomain.com/all/3` then the page is blank.

Also I have only the above code in .htaccess file and nothing more or less. So why I am getting different behaviour in localhost and in my server?

Answer: 
You can utilize `map` function

```
>>> a=[[1,[1,2,3]],[2,[1]],[3,[1,2]]]
>>> map(lambda v: [v[0],v[1][:2]], a)
[[1, [1, 2]], [2, [1]], [3, [1, 2]]]

```
If you want to do it recursive way
----------------------------------

```
import collections

def doMagic(data):
    if isinstance(data, collections.Iterable):
        if all(type(elem) in [type(1), type('a')] for elem in data):
            return data[:2]
        else:
            return [doMagic(elem) for elem in data][:2]
    else:
        return data

if __name__ == '__main__':
    data = [['A',[1,2,3]],['D',[3,4]],['E',[6,7]],['F',[1]],['G',[7,6,5,4]]]
    print [doMagic(elem) for elem in data]

```