\t not working

bruno at modulix onurb at xiludom.gro
Wed May 17 18:46:13 CEST 2006


Alex Pavluck wrote:
> I am just learning Python and I am using the book, "Thinking like a
> Computer Scientist".  There is an exercise that I am not able to get
> working and it is really easy so I thought I would ask for help here.
> 
> 
> Q: As an exercise, write a single string that:
>     Procuces
>                    this
>                            output.
> 
> 
> A? 
> print "produces",'\n',"\t","this","\n","\t","output."

Which results in:
produces
        this
        output.

I think the problem should be *really* obvious. Hint : count the "\t".

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list