Re: [Tutor] Excited about python

2011-06-13 Thread Siim Märtmaa
2011/6/10 Kaustubh Pratap chand : > Can you recommend a book for a person like me which comes with a C > background and the book covers all essential algoithmic methods and > examples? You, might find "Data Structures and Algorithms with Object-Oriented Design Patterns in Python" by Bruno R. Preis

Re: [Tutor] making object iterable

2011-02-05 Thread Siim Märtmaa
2011/2/5 Alex Hall : > Yes, I get the same thing. However, when you try to index, as in a[0], > you have problems. Here are two lines from my program: > for i in res: print i > This works as expected, printing every object in res.results, just as I > wanted. > > for i in range(len(res)): print str

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Siim Märtmaa
2009/7/1 Daniel Sato : > I have been going through some Python Programming exercises while following > the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with > the first "If" exercise listed on this page: > > http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statement

[Tutor] Printing concatenated unicode strings

2008-10-20 Thread Siim Märtmaa
Hello i would like to do this >>> print u'\u30fa' ヺ with a method like this b = "30fa" uni = u'\u' + b + '\'' but it prints this UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-1: end of string in escape sequence so how to concatenate properly to print the characte