Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: delete value in list in indexing

12 views
Skip to first unread message

Dave Angel

unread,
Nov 6, 2012, 9:01:33 AM11/6/12
to Amit Agrawal, pytho...@python.org
On 11/06/2012 01:17 AM, Amit Agrawal wrote:
> i want to delete list in upper and lower some specific value
>
>

That question will have to be rephrased, in clearer English.

What Python version are you using?

What data do you start with, and what data do you want to end up with?
Be specific with regards to types.

For example, you might be asking:

"I am using Python 2.81, on Windows 9. I have a program that's got two
strings, the second of which is a single character. I'd like to produce
a 3rd string which consists of all characters of the first string that
do not match the single character supplied. Further, if the character
is an ASCII alpha character, I'd like to do it without regards to ASCII
uppercase/lowercase."

or

"I am using .... I have a program that has a list of ints, and a
single value. I'd like to do an in-place removal of all numbers that
are within 5 of the specified value."



--

DaveA

Mark Lawrence

unread,
Nov 6, 2012, 9:45:14 AM11/6/12
to pytho...@python.org
On 06/11/2012 06:17, Amit Agrawal wrote:
> i want to delete list in upper and lower some specific value
>

I think you want to delete a slice so read about slicing here
http://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range

--
Cheers.

Mark Lawrence.

0 new messages