[Tutor] How can I escape a pound symbol in my script?

Alan Gauld alan.gauld at btinternet.com
Fri Jul 6 10:07:24 CEST 2007


Moving somewhat off topic...

> > file). I need to write out a pound sign '#' to the file
> Works fine here:
> $ python -c 'open("foo","w").write("£")'

I always find it amusing when Americans refer to the
hash or square symbol (#) as a pound sign (£). This
is of course an historical feature of old keyboards
when, to get a hash symbol (#), you had to type a
pound sign(£), ie shift 3.

In the UK the pound sign (£ - shift 3) was actually used
as a pound sign for currency so their hash is located at
the extreme left of the middle row (and in various other
places on some keyboards!)

I wonder how many other countries refer to the hash symbol
as a pound sign?

Alan G. 




More information about the Tutor mailing list