Question: I save phone number in Database using Spring Data JPA , 

In model I define this  

`private String directPhone;`

while saving `supplier.directPhone="99250397679"`

And In DB it save in exponential Form

It save in this form `direct_phone: 9.925039767E9`

```
Supplier supplier=supplierRepository.findOne(new Long(1));

```

And while receiving it give me in exponential Form .

But I want in String form . Help me to get in String form. Same thing happen with `year=2005` and it save `year=2005.0`

Answer: 
**Update**:  

You loop through the file's contents *twice*:

```
with open(filename, 'r') as file:
    #...  

with open(filename, 'r') as file:
    #...

```

The first time you add all the "valid" lines to an array, namely `names_list` (why this identifier?). The second time you just print the number of words in *each line*, regardless of their validity. You only need to loop *once*.

```
with open(filename, 'r') as file:
    for line in file:
        if line.strip() and not line.startswith("#"):
            names_list.append(line)
            print "There are ", len(line.split()), " numbers on this line"

```

---

What you want is `split`.

See [this answer](https://stackoverflow.com/a/743823/2773311).

**Assuming** that the line contains only integers on each non-# line, just split it and count the number of "words".

```
#after checking the line is valid
print "This line contains", len(line.split()), "numbers"

```
I think you meant [`.split()`](https://docs.python.org/2/library/string.html) instead of [`.strip()`](https://docs.python.org/2/library/stdtypes.html#str.strip). Replace:

```
words = len(line.strip(' '))

```

with:

```
words = len(line.split())

```