[Tutor] Fwd: Read from large text file, find string save 1st string of each line where it appeared.

2015-12-28 Thread sutanu bhattacharya
suppose 115160371 is my facebook id. 6174625 is the id of one of my
friends. If i give an id ,the output will be the id of those people who are
friend of 6174625.


-- Forwarded message --
From: Joel Goldstick 
Date: Mon, Dec 28, 2015 at 9:20 PM
Subject: Re: [Tutor] Read from large text file, find string save 1st string
of each line where it appeared.
To: sutanu bhattacharya 


Please don't write me.  Write to the mailing list

On Mon, Dec 28, 2015 at 10:43 AM, sutanu bhattacharya <
totaibhattacha...@gmail.com> wrote:

> Hi Joel,
>
> suppose 115160371 is my facebook id. 6174625 is the id of one of my
> friends. If i give an id ,the output will be the id of those people who are
> friend of 6174625.
>
> thanking you,
> Sutanu
>
>
>
> On Mon, Dec 28, 2015 at 7:00 PM, Joel Goldstick 
> wrote:
>
>>
>>
>> On Mon, Dec 28, 2015 at 6:20 AM, sutanu bhattacharya <
>> totaibhattacha...@gmail.com> wrote:
>>
>>> {'115160371': [45349980, 22477811, 40566595, 26947037, 16178191,
>>> 12984002,
>>> 20087719, 19771564, 61746245, 17467721, 32233776, 31052980, 70768904,
>>> 16113331, 12414642]} 
>>>
>>> suppose 61746245  is my searching string. so o/p will
>>> be
>>> 115160371  (1st string). Area in between third
>>> bracket ([
>>> ]) is the searching area...
>>>
>>>
>>> kindly help me to solve this problem..
>>>
>>> --
>>> Sutanu Bhattacharya
>>> ___
>>> Tutor maillist  -  Tutor@python.org
>>> To unsubscribe or change subscription options:
>>> https://mail.python.org/mailman/listinfo/tutor
>>>
>>
>> def problem(6174625):
>> return 115160371
>>
>> You haven't really described your problem, so above is a solution for
>> what you asked.  What have you tried so far, and what was your result?
>>
>> --
>> Joel Goldstick
>> http://joelgoldstick.com/stats/birthdays
>>
>
>
>
> --
> Sutanu Bhattacharya
>
>
>


-- 
Joel Goldstick
http://joelgoldstick.com/stats/birthdays



-- 
Sutanu Bhattacharya
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fwd: Read from large text file, find string save 1st string of each line where it appeared.

2015-12-28 Thread Mark Lawrence

On 28/12/2015 15:56, sutanu bhattacharya wrote:

suppose 115160371 is my facebook id. 6174625 is the id of one of my
friends. If i give an id ,the output will be the id of those people who are
friend of 6174625.


-- Forwarded message --
From: Joel Goldstick 
Date: Mon, Dec 28, 2015 at 9:20 PM
Subject: Re: [Tutor] Read from large text file, find string save 1st string
of each line where it appeared.
To: sutanu bhattacharya 


Please don't write me.  Write to the mailing list

On Mon, Dec 28, 2015 at 10:43 AM, sutanu bhattacharya <
totaibhattacha...@gmail.com> wrote:


Hi Joel,

suppose 115160371 is my facebook id. 6174625 is the id of one of my
friends. If i give an id ,the output will be the id of those people who are
friend of 6174625.

thanking you,
Sutanu



On Mon, Dec 28, 2015 at 7:00 PM, Joel Goldstick 
wrote:




On Mon, Dec 28, 2015 at 6:20 AM, sutanu bhattacharya <
totaibhattacha...@gmail.com> wrote:


{'115160371': [45349980, 22477811, 40566595, 26947037, 16178191,
12984002,
20087719, 19771564, 61746245, 17467721, 32233776, 31052980, 70768904,
16113331, 12414642]} 

suppose 61746245  is my searching string. so o/p will
be
115160371  (1st string). Area in between third
bracket ([
]) is the searching area...


kindly help me to solve this problem..

--
Sutanu Bhattacharya
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor



def problem(6174625):
 return 115160371

You haven't really described your problem, so above is a solution for
what you asked.  What have you tried so far, and what was your result?

--
Joel Goldstick
http://joelgoldstick.com/stats/birthdays





--
Sutanu Bhattacharya








Suppose that you stop top posting?  Then it would be far easier for 
people to follow the thread.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor