i wonder how to know , a position inside the .txt when I read.
this is my txt
cat dog monkey bird
this my printing
Word: cat Position: line 1 , word 1 (1,1)
any idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This would work for this given file:
The code:
Would print:
You should be able to modify this quite easily to make a function or different output I hope.
Although I’m still really not sure if this is what you’re after…
Minor edit:
As a function:
Use:
Shrug Not the best method I’ll give it that, but then again it works.