Separate Address number and name
Asaf Las
roegltd at gmail.com
Tue Jan 21 19:08:23 EST 2014
On Wednesday, January 22, 2014 1:49:16 AM UTC+2, Shane Konings wrote:
> I have the following sample from a data set and I am
> looking to split the address number and name into separate headings
>as seen below.
> I have struggled with this for a while and know there must be a simple method to achieve this result.
input = '''1 1067 Niagara Stone
2 4260 Mountainview
3 25 Hunter
4 1091 Hutchinson
5 5172 Green Lane
6 500 Glenridge
7 471 Foss
8 758 Niagara Stone
9 3836 Main
10 1025 York '''
tlist = input.splitlines()
for k in tlist:
print(k.split())
do with 'k' whatever you wish
More information about the Python-list
mailing list