>>> "string whose last four letters are abcd"[-4:]

'abcd'

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Robert Rawlins - Think Blue
Sent: 21 February 2008 11:36
To: python-list@python.org
Subject: Last 4 Letters of String

 

Hello Guys,

 

I'm looking for a function which will give me the last 4 characters of a
given string. I'm sure it's a very simple task but I couldn't find
anything of it.

 

Any ideas?

 

Rob

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to