Question: **this is my code** it prints with lots of space after OS Name: how to strip off the white space? was trying to use split, I guess did not use it in right way

OS Name:Microsoft Windows 7 Professional 

See the Microsoft Knowledge Base article 2344941

```
#!/usr/bin/env python
import sys, re, os

lineContains = re.compile('.*OS Name.*')
lineHas = re.compile('.*OS Version.*')

filename = open("system-info.txt", 'r')
for line in filename:
    if lineContains.match(line):
        ''.join(line.split())
        print line
        if "Windows 7" in line:
            print 'See the Microsoft Knowledge Base article 2344941'
        else:
            print 'See the Microsoft Knowledge Base article 2550978'    
filename.close()

```

Answer: 
You can create an array that lets you supply negative indexes to your array:

```
var grid = (int[,])Array.CreateInstance(typeof(int),new[] {7,7}, new[] {-3,-3});
for (int r = -3 ; r <= 3 ; r++) {
    for (int c = -3 ; c <= 3 ; c++) {
        grid[r,c] = 10+r + c;
    }   
}

```

[Demo on ideone.](http://ideone.com/gbZrAa)

You can make an array with a single dimension, too, but you wouldn't be able to convert it to `int[]` because CLR uses a special type for one-dimension arrays. However, you could use such array with negative indexes through the `Array` API. The documentation says that you are not allowed to pass such arrays to the `BinarySearch` method.
There is a way to create an `Array` with negative indexes in .NET, using this overload of [`Array.CreateInstance`](http://msdn.microsoft.com/en-us/library/x836773a%28v=vs.110%29.aspx) factory method, where you can specify the lower bound of the index:

```
public static Array CreateInstance(
    Type elementType,
    int[] lengths,
    int[] lowerBounds
)

```

A 1-dimensional array with length of 10 and index starting at -10:

```
var a = Array.CreateInstance(typeof(string), new[] { 10 }, new[] { -10 });
a.SetValue("test", -5);
Console.WriteLine(a.GetValue(-5));
Console.WriteLine(a.GetLowerBound(0));

// yields:
// test
// -10

```

Also note that a 1-dimensional array with negative index lower bound cannot be cast to a *vector*, such as `int[]`, which must be 0-based indexed. This kind of array is of different type than vector or 0-based indexed array:

```
Console.WriteLine((Array.CreateInstance(typeof(int), new[] { 1 }, new[] { -1 })).GetType());
Console.WriteLine((Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 0 })).GetType());
Console.WriteLine((new int[] {}).GetType());

// yields:
// System.Int32[*]
// System.Int32[]
// System.Int32[]

(int[])Array.CreateInstance(typeof(int), new[] { 1 }, new[] { -1 })

// throws:
// System.InvalidCastException

```