python - How to get everything from the list except the first element using list slicing -
this question has answer here:
- explain slice notation 24 answers
so have parsing, here example of do:
list = ['a', 'b', 'c']
and using list slicing have return me first index. in case:
['b', 'c']
i have been messing stuff list[:-1], list[::-1], list[0:-1], etc. can't seem able find out.
what actual doing is: * have error message has error code in beginning such as:
['226', 'transfer', 'complete']
and want display transfer complete on popup widget. of course casting string.
thank help, , if answer differs via python 2.7.x , python 3.x.x please answer both versions.
thanks, looked lot around stackoverflow , python tutorials couldn't quite looking for. help!
you can [1:]. work on both versions.
Comments
Post a Comment