Index: django/template/defaultfilters.py
===================================================================
--- django/template/defaultfilters.py	(revision 6903)
+++ django/template/defaultfilters.py	(working copy)
@@ -431,8 +431,16 @@
         return value[0]
     except IndexError:
         return u''
-first.is_safe = True
+first.is_safe = False
 
+def last(value): 
+    "Returns the last item in a list" 
+    try: 
+        return value[-1] 
+    except IndexError: 
+        return u'' 
+last.is_safe = False
+
 def join(value, arg):
     """Joins a list with a string, like Python's ``str.join(list)``."""
     try:
Index: tests/regressiontests/defaultfilters/tests.py
===================================================================
--- tests/regressiontests/defaultfilters/tests.py	(revision 6903)
+++ tests/regressiontests/defaultfilters/tests.py	(working copy)
@@ -508,6 +508,10 @@
 u'123'
 >>> striptags(123)
 u'123'
+>>> last([0, 1, 2, 3, 4]) 
+4 
+>>> last(u'Hello') 
+u'o' 
 
 """
 
Index: docs/templates.txt
===================================================================
--- docs/templates.txt	(revision 6903)
+++ docs/templates.txt	(working copy)
@@ -1403,6 +1403,11 @@
 
 Joins a list with a string, like Python's ``str.join(list)``.
 
+last
+~~~~
+
+Returns the last item in a list.
+
 length
 ~~~~~~
 
