diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 31941bc112a135..7279a3faecaac6 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -188,6 +188,9 @@ have fast appends and pops from both ends. For example:: 'John' >>> queue # Remaining queue in order of arrival deque(['Michael', 'Terry', 'Graham']) + >>> queue.appendleft("John") # John is added to front of queue + >>> queue + deque(['John', 'Michael', 'Terry', 'Graham']) .. _tut-listcomps: