Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

lists in python

 
manuel aldana
Ranch Hand
Posts: 308
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey,

i am scripting in python. i am quite annoyed that i can't pop() an list element without removing it.

is there a built-in way to get the last element and still keep it in the list?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
akhter wahab
Ranch Hand
Posts: 151
Java MyEclipse IDE Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
manuel aldana wrote:hey,

i am scripting in python. i am quite annoyed that i can't pop() an list element without removing it.

is there a built-in way to get the last element and still keep it in the list?




 
akhter wahab
Ranch Hand
Posts: 151
Java MyEclipse IDE Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lasse Koskela wrote:



list is the language word so i think we should not use it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic