We help IT Professionals succeed at work.
Get Started

File manipulation python (indexing and extraction)

dadadude
dadadude asked
on
330 Views
Last Modified: 2012-05-10
i have this file and each time i want to find a number, for example 0, skip the line containing that number and that read all the lines under it, till an empty line. then start all over again with anotehr number for example 2. i tried everything and it's not working!!!!

0
1818      1148
1818      1147

1
1234       31231
3213       312312

2
XXX      XXX
XXX      XXX

and code is following:

number = rand.random(1,10)

coordonnes.txt
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE