Last 4 Letters of String

Michael L Torrie torriem at gmail.com
Thu Feb 21 12:49:00 EST 2008


Robert Rawlins - Think Blue wrote:
> 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.

Use the same technique as you'd use slicing a list.

http://www.diveintopython.org/native_data_types/lists.html

> 
>  
> 
> Any ideas?
> 
>  
> 
> Rob
> 
> 
> 




More information about the Python-list mailing list