Though its obvious but still to add an explanation to complete the response.On detecting EOF EOFError is exception is returned.I am catching that using pythons exception handling(just like try catch in c++).In except block u can include the operations that should be performed on catching EOF.Hope the answer is complete enough
On Fri, Nov 18, 2011 at 6:10 PM, saurabh singh <saurab...@gmail.com> wrote: > > > try: > while 1: > i=input() > print i > except EOFError: > a='' > > One possible way......dont know if there are other elegant ways of doing > the same. > > -- > Saurabh Singh > B.Tech (Computer Science) > MNNIT ALLAHABAD > > > -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.