Re: C++ or Python

2008-06-28 Thread c0mrade
Kurda Yon wrote: > > I would like to know what are advantages of Python in comparison with C > ++? In which cases and why Python can be a better tool than C++? > Uh, code a trivial program in each language and you'll have a perfectly good idea. -- View this message in context: http://www.na

Re: Testing for Null?

2008-06-28 Thread c0mrade
Try something like this... list = ['lkdfjsldk', None, '', '0', 'slfkjsdlfj', 'lsdgjdlfg', False, True] for n, it in enumerate(list): if not it: print 'Error on this definition' else: print '%d. %s' % (n+1, it) Results: 1. lkdfjsldk Error on this definition Error on this definition 4. 0 5