[algogeeks] EOF

2011-09-06 Thread Anurag Gupta
how to read a string whose length is not known and string is so long that we can't read it all at once? input (i.e string) is terminated by EOF -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] EOF

2011-09-06 Thread Kunal Patil
If I understand question correctly, then just read as many characters as you can using standard string functions. (like fgets n all related) Output these all characters in a file. Iterate until you have read all the characters and go on appending what you have read to file. You intended to ask

Re: [algogeeks] EOF

2011-09-06 Thread Anup Ghatage
You can quite easily map this problem to that of a typical client-server protocol. You don't know the size of the data, and the all packets will be of a certain size, possibly, except the last one. So the solutions provided for that problem might apply to some cases of this! -- Anup Ghatage --

[algogeeks] EOF in Python for SPOJ

2011-05-25 Thread Vishnutej
Hello everyone, I'm new to python.How can I check the EOF for inputs in SPOJ? Thanks in advance!! -Vishnutej -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe

Re: [algogeeks] EOF in Python for SPOJ

2011-05-25 Thread abhijith reddy
while(1): try: # code # # except EOFError: break On Wed, May 25, 2011 at 8:41 PM, Vishnutej mylavarapu.vishnu...@gmail.comwrote: Hello everyone, I'm new to python.How can I check the EOF for inputs in SPOJ? Thanks in advance!! -Vishnutej -- You received this

Re: [algogeeks] EOF in Python for SPOJ

2011-05-25 Thread Vishnutej Mylavarapu
Thnx a lot abhijith.. Do you have any links for tutorials for beginners? On Wed, May 25, 2011 at 8:42 PM, abhijith reddy abhijith200...@gmail.comwrote: while(1): try: # code # # except EOFError: break On Wed, May 25, 2011 at 8:41 PM, Vishnutej

Re: [algogeeks] EOF in Python for SPOJ

2011-05-25 Thread abhijith reddy
A Byte of Python - Freely available online. http://docs.python.org/library/; - Python Library Reference. On Wed, May 25, 2011 at 8:52 PM, Vishnutej Mylavarapu mylavarapu.vishnu...@gmail.com wrote: Thnx a lot abhijith.. Do you have any links for tutorials for beginners? On Wed, May 25,

Re: [algogeeks] EOF in Python for SPOJ

2011-05-25 Thread Aman (neshu) Agarwal
for line in sys.stdin: print line, print eof -- Aman Agarwal -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] EOF in Python for SPOJ

2011-05-25 Thread Aman (neshu) Agarwal
do not forget to import sys import sys for line in sys.stdin: print line, print eof On Wed, May 25, 2011 at 9:12 PM, Aman (neshu) Agarwal neshuagarwal1...@gmail.com wrote: for line in sys.stdin: print line, print eof -- Aman Agarwal -- Aman Agarwal -- You received this

Re: [algogeeks] EOF in Python for SPOJ

2011-05-25 Thread Vishnutej Mylavarapu
What are the cases for which I might get NZEC?? On Wed, May 25, 2011 at 9:13 PM, Aman (neshu) Agarwal neshuagarwal1...@gmail.com wrote: do not forget to import sys import sys for line in sys.stdin: print line, print eof On Wed, May 25, 2011 at 9:12 PM, Aman (neshu) Agarwal