473,382 Members | 1,583 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,382 software developers and data experts.

Is this a bug? I don't know where to start

Is this a python bug, or do i not understand
something?

http://www.linuxquestions.org/questi...hreadid=336118

It seems to me that this should output each value
once, but i get some seemingly random duplicates.

If it is a bug, what do i file it under. I don't know
what's wrong to cause this.

thanks
jim
Jul 19 '05 #1
1 1108
jim bardin wrote:
Is this a python bug, or do i not understand
something?

http://www.linuxquestions.org/questi...hreadid=336118

It seems to me that this should output each value
once, but i get some seemingly random duplicates.


Your targets contains duplicates - and these produce the problem. And as
print len(all) == len(set(all))

False

shows your alleged " i checked the output of the combination generator
and they're all unique values." is obvously wrong.

Doing this

targets=list(set([97,101,139,41,37,31,29,89,23,19,8,13,131,19,73,97, 19,139,79,67,61,17,113,127]))
as first line solves the problem.
Diez
Jul 19 '05 #2

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

Similar topics

0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
18
by: tomakated | last post by:
Hi, i'm new here and I can't get my get_item_price() function to work I need it to take in 4 items int main() { double item1, item2, item3, item4, lowest=0, total; char response;
15
by: Paul T. RONG | last post by:
Hello, I am making a restaurant database (it is much more complicated than I thought before!), now it comes to the last stage and I come across a problem. I will explain it in detail. In a...
2
by: David | last post by:
SUMMARY: If you don't want to read all of this, what I'm looking for more or less is ideas on how to implement websites using ASP.NET that have a templated look and feel and many pages that make...
1
by: Filips Benoit | last post by:
Dear All, I don't know how to start ! I have a table named COMPANY_HOLIDAY having fields: COMH_ID, COMH_HOL_FROM_DATE and COMH_HOL_TO_DATE ID FROM_DATE TO_DATE 1 13/12/2006 ...
3
by: fedderico10 | last post by:
Heloo everybody!! Hope someone can help me because im new to C++ Im trying to write a program in c++. This must run and keep waiting until i type one number (0-9) and then run some functions i've...
3
markmcgookin
by: markmcgookin | last post by:
Hi Folks, I have a VB app, and I have been working at it for a while, and I am now at the stage where I want to create a search function. Now don't be scared! It is in the .Net compact framework,...
6
by: webandwe | last post by:
Hi, My script lets you choose if you want to view table 1 or table 2 in mysql after you selected 1 or 2 from the drop down menu and press submit. The problem is if you run the script for the...
3
by: =?Utf-8?B?UmF5?= | last post by:
Hello. I have a c# service with four threads. Sometimes one of them just don't start, I don't know why. It happened with any of the four threads, and just in production environment, not in...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.