473,396 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to clear up a List in python?

I have new a list , when it hava large number of values, I wonna to
delete all the values in it,how to do?
And, if a list have 801 values, I want to get its values index from 300
to 400, could use list1[300:400],are right me?

May 25 '06 #1
36 10928
> I have new a list , when it hava large number of values, I wonna to
delete all the values in it,how to do?
something like this will probably help.

x = [1,2,3,4,5,6,7,8,9]
y = x

list([x.pop() for z in xrange(len(x))])

print x, y # [] []
And, if a list have 801 values, I want to get its values index from 300
to 400, could use list1[300:400],are right me?


300 will be included in your slice whereas the 400th index will be
excluded. you will ultimately have 99 items in your slice. if you want
values from index 300 to 400 you'll need to say [300:401]. the first
index is included. the last index is excluded.

good luck!

May 25 '06 #2
python wrote:
I have new a list , when it hava large number of values, I wonna to
delete all the values in it,how to do?
And, if a list have 801 values, I want to get its values index from 300
to 400, could use list1[300:400],are right me?

del list1[:]
del list1[:-1000] # keep max. last 1000 appended items in the list
list1[:]=replace_list
....

-robert
May 25 '06 #3
> del list1[:]

thank you for that reply. I never thought of [:] cause to be me I
thought it would immediately make a copy of the list or if anything
that it would delete a copy so I never played with it. nice :)
del list1[:-1000] # keep max. last 1000 appended items in the list
list1[:]=replace_list


very much thanks for the tips. they're great!

May 25 '06 #4
>> And, if a list have 801 values, I want to get its values index from 300
to 400, could use list1[300:400],are right me?


300 will be included in your slice whereas the 400th index will be
excluded. you will ultimately have 99 items in your slice.


No, he'll have 100 items in the slice... 300, 301,... 399 that's 100 items.

--
damjan
May 25 '06 #5
> No, he'll have 100 items in the slice... 300, 301,... 399 that's 100 items.

you're right, sorry. [300:400] would return 100 items but the item at
index 400 would not return. I suggested if he wanted it to try
[300:401] as the last slice index is excluded from the return.

Thanks for that :)

May 25 '06 #6
vbgunz wrote:
I have new a list , when it hava large number of values, I wonna to
delete all the values in it,how to do?


something like this will probably help.

x = [1,2,3,4,5,6,7,8,9]
y = x

list([x.pop() for z in xrange(len(x))])

print x, y # [] []


if you don't know how to do things, you don't need to post.

if you know why this is about the dumbest way to do what you're doing,
and you're posted this on purpose, you really need to grow up.

</F>

May 25 '06 #7
D H
Fredrik Lundh wrote:
vbgunz wrote:
I have new a list , when it hava large number of values, I wonna to
delete all the values in it,how to do?


something like this will probably help.

x = [1,2,3,4,5,6,7,8,9]
y = x

list([x.pop() for z in xrange(len(x))])

print x, y # [] []


if you don't know how to do things, you don't need to post.

if you know why this is about the dumbest way to do what you're doing,
and you're posted this on purpose, you really need to grow up.

</F>


He already posted before your post that he made a mistake.
You obviously ignored that and invented some argument that he
posted with malicious intentions. That better describes most of
your thousands of annoying posts.
May 25 '06 #8
D H <no@spam.please> wrote in news:jb********************@comcast.com:
You obviously ignored that and invented some argument that he
posted with malicious intentions. That better describes most of
your thousands of annoying posts.


I don't know what describes what you did. What is the point of bringing
clpmisc into this argument.

Anyway, *PLONK*

Sinan

--
A. Sinan Unur <1u**@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
May 25 '06 #9
> if you don't know how to do things, you don't need to post.
if you know why this is about the dumbest way to do what you're doing,
and you're posted this on purpose, you really need to grow up.


If this was the case who then would post any questions? I not only made
my post with the best of intentions but felt attaching a strongly
worded and lengthy warranty over the script performance and pythonic
value would be overkill. I admit I am not the best at Python and I have
no problem in being offered a more optimized solution but to insult me
is childish. no?

It's ok and I have no grudge with you Fredrik. I would appreciate
though you simply point out my error with a suggested solution and if
energy permit, tell me why my solution is not so good and why yours is
better. I would value that very much. Also, not to be the dummy or
anything but my solution did exactly what the first poster requested.

Robert happened to point out a much better and most likely preffered
alternative solution. It was great! I live and I learn.

Have a good day!

May 25 '06 #10
Thus spoke D H (on 2006-05-25 23:12):
Fredrik Lundh wrote:
if you don't know how to do things, you don't need to post.


He already posted ...


Based on your Text, you can (in Perl, of course ;-)
extract the Goedel-Number sequence (prime number
sequence) of it:

use Acme::Goedelize;

my $goed = new Acme::Goedelize;
my $rant = do { local $/; (<DATA>) };
$rant = ~s/[.\n]//mg;
print join "\n", $goed->to_number($rant)=~/(\d{64})/g;

__DATA__
He already posted before your post that he made a mistake.
You obviously ignored that and invented some argument that he
posted with malicious intentions. That better describes most of
your thousands of annoying posts.
This prints a (64 char blocked) "Version"
of your text, which can be retranslated
to your text by 'degoedelization'.

How'd you do *that* in Python ;-)

Regards

Mirco

f'up c.l.python
May 25 '06 #11
vbgunz wrote:
if you don't know how to do things, you don't need to post.


If this was the case who then would post any questions?


you didn't post a question, you provided a ludicrously bad solution in
response to a simple question.

that's not a good way to promote Python.

</F>

May 25 '06 #12
I will not try and stop helping others because you don't like my
answers. I found a perfectly good way how not to do something that
wasn't exactly wrong anyway. if you can take another persons honest
attempt to help someone and twist it into something it is not, I can
only suggest you look in the mirror and only if you're truly perfect
you continue your banter.

by the way, I am not here to promote Python. but if this is of your
concern, perhaps maybe you should rethink how you respond in kind
towards post you do not exactly agree with. Others are reading this and
it might not come off as promotional material. Also, if you're having a
bad day, take a rest and relax. You just might deserve it.

May 25 '06 #13
vbgunz wrote:
I will not try and stop helping others because you don't like my
answers. I found a perfectly good way how not to do something that
wasn't exactly wrong anyway. if you can take another persons honest
attempt to help someone and twist it into something it is not, I can
only suggest you look in the mirror and only if you're truly perfect
you continue your banter.

by the way, I am not here to promote Python. but if this is of your
concern, perhaps maybe you should rethink how you respond in kind
towards post you do not exactly agree with. Others are reading this and
it might not come off as promotional material. Also, if you're having a
bad day, take a rest and relax. You just might deserve it.


I guess Fredrik's message was more along the lines of ``don't try to
"help" others after a week or two toying with the language because you
might be offering disservice, despite your good intentions; leave this
to more experienced users``. The words might have been a bit harsher
but that's just his style; you'll get used to it if you hang around
here often.

George

May 26 '06 #14
> I guess Fredrik's message was more along the lines of ``don't try to
"help" others after a week or two toying with the language because you
might be offering disservice, despite your good intentions; leave this
to more experienced users``. The words might have been a bit harsher
but that's just his style; you'll get used to it if you hang around
here often.


I much rather stand corrected than to silently remain ignorant. I take
revision of my solution for all it's worth but to be belittled without
correction is arrogant and unnecessary. I've been working with Python
for several months now and I feel I know plenty *but* I am still
learning.

I personally never had to clear a list. I never thought of Roberts
answer and my reasoning is in Roberts message. In the end I stood
correct because Robert was nice enough to answer two birds with one
stone. Fredrik on the other hand had nothing positive to add and his
message seemed gestapo.

Where I come from and how I grew up is quite simple. A wrong answer is
better than no answer and a worthless remark is worth garbage. Why?
Because no right answer is gospel and no answer no matter how dumb is
cause for discourtesy. I tried and thats the bottom line.

May 26 '06 #15
George Sakkis wrote:
I guess Fredrik's message was more along the lines of ``don't try to
"help" others after a week or two toying with the language because you
might be offering disservice, despite your good intentions; leave this
to more experienced users``.


no matter what Doug Holton and "vbgunz" thinks, if you ask a question on
comp.lang.python and use the answer you're getting, you shouldn't end up
on thedailywtf.com.

</F>

May 26 '06 #16
Fredrik_Lundh = 'wah'

I bet you enjoy stealing candy from babies and dunging on the little
guy every chance you get. You're suppose to be a role model in this
community? Your temper tantrum and unrelenting 'look at me look at me
i'm bigger and better' machismo attitude is nothing more than a decoyed
ploy set out by a deluded megalomaniac. You're promoting Python or the
fact that you're the son of Zeus and Hera? You're the worse sore losing
cry baby I've ever witnessed on the net in my ten years here...
pathetic for sure...

May 26 '06 #17
vbgunz wrote:
Fredrik_Lundh = 'wah'

I bet you enjoy stealing candy from babies and dunging on the little
guy every chance you get. You're suppose to be a role model in this
community? Your temper tantrum and unrelenting 'look at me look at me
i'm bigger and better' machismo attitude is nothing more than a decoyed
ploy set out by a deluded megalomaniac.
Personally speaking, Fredrik's just sitting here beneath me, and I can assure
you that he's not screaming "I'm bigger and better than you all" every
few minutes. He may be screaming "I made it faster!", but that's why we're
here ;)
You're promoting Python or the
fact that you're the son of Zeus and Hera? You're the worse sore losing
cry baby I've ever witnessed on the net in my ten years here...
pathetic for sure...


You perhaps shouldn't become so excited. Next time, if you're not sure of
the correctness of your solution, try to wait a bit before posting it,
and see if someone other comes up with the same thing you would have posted.

Georg
May 26 '06 #18
vbgunz wrote:
Fredrik_Lundh = 'wah'

I bet you enjoy stealing candy from babies and dunging on the little
guy every chance you get. You're suppose to be a role model in this
community? Your temper tantrum and unrelenting 'look at me look at me
i'm bigger and better' machismo attitude is nothing more than a decoyed
ploy set out by a deluded megalomaniac.
Personally speaking, Fredrik's just sitting here next to me, and I can assure
you that he's not screaming "I'm bigger and better than you all" every
few minutes. He may be screaming "I made it faster!", but that's why we're
here ;)
You're promoting Python or the
fact that you're the son of Zeus and Hera? You're the worse sore losing
cry baby I've ever witnessed on the net in my ten years here...
pathetic for sure...


You perhaps shouldn't become so excited. Next time, if you're not sure of
the correctness of your solution, try to wait a bit before posting it,
and see if someone other comes up with the same thing you would have posted.

Georg
May 26 '06 #19
> You perhaps shouldn't become so excited. Next time, if you're not sure of
the correctness of your solution, try to wait a bit before posting it,
and see if someone other comes up with the same thing you would have posted.


George, if Frederik's first reply was replaced with yours chances are
this little waste of time would have never had taken place. I am not an
animal and I am capable of understanding my mistakes but trying to
embarass me and belittle me in front of all of my peers here when all I
tried to do was help is absolutely pathetic the first time around.

I don't try to come off as a know it all here and I don't feel I should
post a gospel warning label on my help signature but Fredrik could have
delivered his message in a much better tone. I too am learning Python
and if maybe my answer was not evident enough of that then how smart is
Fredrik to persecute me for it?

I don't wish to question Fredriks knowledge or his position in the
whole scheme of Python but to disrespect me in the name of arrogance
and call it just is a mislabel. I don't wish to carry on with this, I
don't... I just have no love for a bully and Fredrik is proving himself
to be just that.

Good day George!

May 26 '06 #20
vbgunz wrote:
I guess Fredrik's message was more along the lines of ``don't try to
"help" others after a week or two toying with the language because you
might be offering disservice, despite your good intentions; leave this
to more experienced users``. The words might have been a bit harsher
but that's just his style; you'll get used to it if you hang around
here often.

I much rather stand corrected than to silently remain ignorant. I take
revision of my solution for all it's worth but to be belittled without
correction is arrogant and unnecessary. I've been working with Python
for several months now and I feel I know plenty *but* I am still
learning.

I personally never had to clear a list. I never thought of Roberts
answer and my reasoning is in Roberts message. In the end I stood
correct because Robert was nice enough to answer two birds with one
stone. Fredrik on the other hand had nothing positive to add and his
message seemed gestapo.

Where I come from and how I grew up is quite simple. A wrong answer is
better than no answer and a worthless remark is worth garbage. Why?
Because no right answer is gospel and no answer no matter how dumb is
cause for discourtesy. I tried and thats the bottom line.

Frankly I can't agree that a wrong answer is better than no answer,
despite my frequent strategy of opining that something is impossible
just so the cleverer denizens of c.l.py will prove me wrong. A wrong
answer requires correction by people who know the "right" answer, so you
end up consuming group bandwidth and mindshare unnecessarily.

I am assuming the part of Fredrik's post that "seemed gestapo" to you
is """if you don't know how to do things, you don't need to post."""

Please read this carefully, as Fredrik's use of language is precise: he
doesn't say you *shouldn't* post, he says you don't *need to*. This is
good advice, because posting a lame solution too quickly, while
reflecting an earnest and praiseworthy desire to help, can often lead to
trouble with some of the less patient members of our community.

You did indeed try, and I give you points for that. I'd have given you
more points for a further response along the lines of """[Smacks head!]
of course, my solution wasn't very clever, was it?"

Later in this thread (the time machine tells me) you go on to say:
I bet you enjoy stealing candy from babies and dunging on the little
guy every chance you get. You're suppose to be a role model in this
community? Your temper tantrum and unrelenting 'look at me look at me
i'm bigger and better' machismo attitude is nothing more than a decoyed
ploy set out by a deluded megalomaniac. You're promoting Python or the
fact that you're the son of Zeus and Hera? You're the worse sore losing
cry baby I've ever witnessed on the net in my ten years here...
pathetic for sure...


Now that's the kind of behaviour I work hard to discourage on this
newsgroup (and everywhere else I can, come to that: you may have noticed
an improvement in President Bush's response to press questions about
Iraq yesterday).

As it happens, although Fredrik and I have corresponded for almost ten
years we have only just met this week at the Need for Speed sprint. I
can tell you the man is a pussy cat, and any offense you might feel is
due to your wounded pride, not his desire to hurt. So go Google for
"egoless programming", take your knocks, and learn to simply apologise
when you are wrong and get on with your life.

The ability to do this has stood me in good stead for many years. I am
hoping against hope that you won't, like Oscar Wilde, feel that "The
only thing you can possibly do with good advice is pass it on". Time
alone will tell. A hint:

http://www.codinghorror.com/blog/archives/000584.html

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

May 26 '06 #21
Steve, I have no qualm with Fredrik over this '''if you don't know how
to do things, you don't need to post.''' but this ''' if you know why
this is about the dumbest way to do what you're doing, and you're
posted this on purpose, you really need to grow up.'''.

The problem was I did post it on purpose, but not with the intent to
mess anyone up over it. To top it off, this thread was done and over
with (the end) with Roberts reply that came in immediately after mines.
I acknowledged his was best and that I *learned* from it.

It just seemed Fredriks response was an attack on me and I did take it
personally because I tried my best. Sometimes I try to give back but to
try and make me regret it is poor communication if the best intent is
to advise me on how things are done and not done around here...

Its all good. I live and I learn...

May 26 '06 #22
vbgunz wrote:
You perhaps shouldn't become so excited. Next time, if you're not sure of
the correctness of your solution, try to wait a bit before posting it,
and see if someone other comes up with the same thing you would have posted.

George, if Frederik's first reply was replaced with yours chances are
this little waste of time would have never had taken place. I am not an
animal and I am capable of understanding my mistakes but trying to
embarass me and belittle me in front of all of my peers here when all I
tried to do was help is absolutely pathetic the first time around.

That's "Georg", by the way ...
I don't try to come off as a know it all here and I don't feel I should
post a gospel warning label on my help signature but Fredrik could have
delivered his message in a much better tone. I too am learning Python
and if maybe my answer was not evident enough of that then how smart is
Fredrik to persecute me for it?
Man, if you think *that* was persecution don't *ever* take up Lisp or
Perl, where they will eat you alive just for not knowing something.
I don't wish to question Fredriks knowledge or his position in the
whole scheme of Python but to disrespect me in the name of arrogance
and call it just is a mislabel. I don't wish to carry on with this, I
don't... I just have no love for a bully and Fredrik is proving himself
to be just that.
No he isn't. Like Python itself this group is for consenting adults, and
you are letting your emotions get in the way of an adult response.
Good day George!

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

May 26 '06 #23
Cant we all just get along ?

Sorry, couldn't resist.

May 26 '06 #24
I read the ten commandments. I enjoyed the link. I see my mistakes.
Thank you.

May 26 '06 #25
vbgunz wrote:
Steve, I have no qualm with Fredrik over this '''if you don't know how
to do things, you don't need to post.''' but this ''' if you know why
this is about the dumbest way to do what you're doing, and you're
posted this on purpose, you really need to grow up.'''.


Well, given that you did post it on purpose and had no "intent to mess
anyone up over it", it is clear that the antecedent in Fredrik's
if-statement is not satisfied and therefore your mind should've skipped
the consequent statement when reading his response. Why get so upset
about something that didn't even apply to you? :-)

-Luis
May 26 '06 #26
> Well, given that you did post it on purpose and had no "intent to mess
anyone up over it", it is clear that the antecedent in Fredrik's
if-statement is not satisfied and therefore your mind should've skipped
the consequent statement when reading his response. Why get so upset
about something that didn't even apply to you? :-)


I wish I could've intepreted it like that... I guess that is one of the
evils of being human. the uncanny ability to intepret ambiguous
understatements and then say fork it when technically you're correct...
it really did not apply to me... The evil of being human I suppose :P

I apologize to Fredrik for my outburst but would like to request that
next time a better suited address be in order even if in doubt. Not
everyone is aware of egoless programming...

May 26 '06 #27
vbgunz wrote:
I read the ten commandments. I enjoyed the link. I see my mistakes.
Thank you.

A genuine pleasure. Welcome to comp.lang.python.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

May 26 '06 #28
The original post only mentions deleting the values in the list, not
the list itself. Given that you want to keep the list and just ditch
the values it contains I'd go with:

list1 = []

-Linnorm

May 26 '06 #29
li*****@gmail.com wrote:
The original post only mentions deleting the values in the list, not
the list itself. Given that you want to keep the list and just ditch
the values it contains I'd go with:

list1 = []

-Linnorm


Which rebinds list1 to a new (empty) list. It doesn't clear the
original list (which appears to be what the OP wants).
list2 = [0,1,2,3,4,5]
list1 = list2
list1 = []
list2 [0, 1, 2, 3, 4, 5]


Duncan
May 26 '06 #30
li*****@gmail.com wrote:
The original post only mentions deleting the values in the list, not
the list itself. Given that you want to keep the list and just ditch
the values it contains I'd go with:

list1 = []


Depends what you mean by "keep the list". Consider

class C (object):
def __init__ (self, things):
self.things = things

a = range (5)
b = C (a)
a = []
print b.things

d = range (5)
e = C (d)
d[:] = []
print e.things

These are very different.
Mel.
May 26 '06 #31
Doesnt this do what the original poster is try accomplish?

Linnorms example -
list1 = [0,1,2,3]
list1 [0, 1, 2, 3] list1 = []
list1 []


May 26 '06 #32
chris brat wrote:
Doesnt this do what the original poster is try accomplish?


Not what the OP asked for, no. Clearing a list implies that list1
should still be bound to the same list (which might be important if
there are other names bound to the same list). If it wasn't important
that it be bound to the same list then I would probably go with
linnorm's approach (which isn't really 'clearing' the list).
list1 = [0,1,2,3]
id(list1) 10772728 del list1[:]
list1 [] id(list1) 10772728 # i.e. the same list list1 = [0,1,2,3]
id(list1) 10675264 list1 = []
id(list1) 10603576 # i.e. a different list


Duncan
May 26 '06 #33
vbgunz wrote:
Steve, I have no qualm with Fredrik over this '''if you don't know how
to do things, you don't need to post.''' but this ''' if you know why
this is about the dumbest way to do what you're doing, and you're
posted this on purpose, you really need to grow up.'''.

The problem was I did post it on purpose, but not with the intent to
mess anyone up over it.


His statement was a conditional. Since you're saying that the
conditional does not apply, then neither does his conclusion. So his
statement doesn't apply to you. So calm down.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
You make me feel like / I can be a better woman
-- India Arie
May 26 '06 #34
Duncan Smith wrote:
chris brat wrote:
Doesnt this do what the original poster is try accomplish?


Not what the OP asked for, no. Clearing a list implies that list1
should still be bound to the same list (which might be important if
there are other names bound to the same list). If it wasn't important
that it be bound to the same list then I would probably go with
linnorm's approach (which isn't really 'clearing' the list).


Sure. However, the OP still might have been happy with just discarding
the old list and creating a new one. Although he explicitly said "clear
the list", he might have meant "make it so that the variable refers to
an empty list", to which clearing the list is only one possible
solution.

Regards,
Martin
May 27 '06 #35
D H a écrit :
Fredrik Lundh wrote:
vbgunz wrote:
I have new a list , when it hava large number of values, I wonna to
delete all the values in it,how to do?
something like this will probably help.

x = [1,2,3,4,5,6,7,8,9]
y = x

list([x.pop() for z in xrange(len(x))])

print x, y # [] []

if you don't know how to do things, you don't need to post.

if you know why this is about the dumbest way to do what you're doing,
and you're posted this on purpose, you really need to grow up.

</F>

He already posted before your post that he made a mistake.


Not the same one. Or there are missing posts on my provider's usenet
service.
You obviously ignored that and invented some argument that he
posted with malicious intentions.
Fredrik may have been a bit harsh, but the fact is that vbgunz's
solution for clearing a list *is* the dumbest possible - and it should
be obvious for anyone past CS101. Now since a lot of Python newbies read
this newsgroup, uncorrected bad answers are far worse than no answer at all.
That better describes most of
your thousands of annoying posts.


Fredrik - aka the effbot - is a Python expert, and a major contributor
here. He's known to be usually very helpful, even for questions that are
in the Fine Manual or in the FAQs. I'm afraid you can say so. You may
not like the way he corrected vbgunz - and I'll wholefully agree on this
- but this last sentence is total bullshit.
May 27 '06 #36
Op 2006-05-26, Steve Holden schreef <st***@holdenweb.com>:
vbgunz wrote:
I guess Fredrik's message was more along the lines of ``don't try to
"help" others after a week or two toying with the language because you
might be offering disservice, despite your good intentions; leave this
to more experienced users``. The words might have been a bit harsher
but that's just his style; you'll get used to it if you hang around
here often.

I much rather stand corrected than to silently remain ignorant. I take
revision of my solution for all it's worth but to be belittled without
correction is arrogant and unnecessary. I've been working with Python
for several months now and I feel I know plenty *but* I am still
learning.

I personally never had to clear a list. I never thought of Roberts
answer and my reasoning is in Roberts message. In the end I stood
correct because Robert was nice enough to answer two birds with one
stone. Fredrik on the other hand had nothing positive to add and his
message seemed gestapo.

Where I come from and how I grew up is quite simple. A wrong answer is
better than no answer and a worthless remark is worth garbage. Why?
Because no right answer is gospel and no answer no matter how dumb is
cause for discourtesy. I tried and thats the bottom line.

Frankly I can't agree that a wrong answer is better than no answer,
despite my frequent strategy of opining that something is impossible
just so the cleverer denizens of c.l.py will prove me wrong. A wrong
answer requires correction by people who know the "right" answer, so you
end up consuming group bandwidth and mindshare unnecessarily.

I am assuming the part of Fredrik's post that "seemed gestapo" to you
is """if you don't know how to do things, you don't need to post."""


But if we all wait until we are perfectly sure that the answer we
will provide is correct, then no-one will need to answer. I
have even seen Fredrik post an answer that IMO was at least outdated.
Please read this carefully, as Fredrik's use of language is precise: he
doesn't say you *shouldn't* post, he says you don't *need to*. This is
good advice, because posting a lame solution too quickly, while
reflecting an earnest and praiseworthy desire to help, can often lead to
trouble with some of the less patient members of our community.


Maybe those less patient members should take the same advise: They
don't need to react.

--
Antoon Pardon
May 29 '06 #37

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: fudmore | last post by:
Hello Everybody. I have a Segmentation fault problem. The code section at the bottom keeps throwing a Segmentation fault when it enters the IF block for the second time. const int...
22
by: mp | last post by:
i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none...
77
by: Ville Vainio | last post by:
I tried to clear a list today (which I do rather rarely, considering that just doing l = works most of the time) and was shocked, SHOCKED to notice that there is no clear() method. Dicts have it,...
7
by: N/A | last post by:
Hi all, I am learning Python. Just wondering how to clear saved memory in Python? Like in Matlab I can simply use "clear all" to clear all saved memory. Thank u!
18
by: Marko.Cain.23 | last post by:
Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict = 1 but how can I empty the whole dictionary? Thank you.
5
by: Bill Jackson | last post by:
What is the benefit of clearing a dictionary, when you can just reassign it as empty? Similarly, suppose I generate a new dictionary b, and need to have it accessible from a. What is the best...
35
by: Lee Crabtree | last post by:
This seems inconsistent and more than a little bizarre. Array.Clear sets all elements of the array to their default values (0, null, whatever), whereas List<>.Clear removes all items from the...
2
by: owl | last post by:
and here I thought I was going to finally be able to change the world AND contribute back to python with my amazing clear screen extension - but I can't get it to work. ;( Copying from...
7
by: Joe P. Cool | last post by:
If I call os.environ.clear in a python program child processes still see the deleted entries. But when I iterate over the keys like so names = os.environ.keys for k in names: del os.environ ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.