Jun 16, 2006 #1 varocho Programmer Dec 4, 2000 238 US Anyone know how to convert a single-element list to a number?
Jun 16, 2006 #2 ZaSter Technical User Dec 20, 2001 195 US Maybe. Please explain a bit more what you are trying to do. Upvote 0 Downvote
Jun 16, 2006 Thread starter #3 varocho Programmer Dec 4, 2000 238 US I figured it out, I was using the wrong syntax. If 'listObj' is a list object, then this listObj[0:1] , an example of 'slicing' the list, returns the first element as another list. But this listObj[0] , an example of indexing the list, returns the first element as an object of whatever type it has. Upvote 0 Downvote
I figured it out, I was using the wrong syntax. If 'listObj' is a list object, then this listObj[0:1] , an example of 'slicing' the list, returns the first element as another list. But this listObj[0] , an example of indexing the list, returns the first element as an object of whatever type it has.