Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

Python List groups of numbers that are in multiple groups of numbers

Hello, I have some experience with PHP, I post this thread in the Python category because I think that what I want to achieve can be done using this language and I'm attracted to it but please tell me if you think I should use an other language.

The server will have to list groups of numbers that are in multiple groups of numbers.
Each groups of numbers has a unique integer ID. The ID is part of its group.

example :
  • 1 =
  • 2 = 1;3;4
  • 3 = 2;4;5
  • 4 = 2;3;5
  • 5 = 3;4
  • 6 =
should output :
  • 2;3;4
  • 3;4;5
As you can see the list #2 doesn't contain the number 5 and vice versa so they don't get in the same output lists.
Do you understand the logic ? Do you think this is an easy task ? If you think about a different/better way to explain what I want to achieve, please tell me.


I post on this forum to ask help/suggestions/tips/thoughts about a way/ways to develop a program that could do that while I think about it on my side, at the moment I have no idea how to do it.
 
For information I tried to edit/cancel/delete this thread to take more time to think about a solution on my own, but it got restored.

Since apparently I'm not allowed to cancel a help request please restore the title.
 
Last edited:
Aha. I was wondering why you named the thread like that.
You description is real confusing... I'd be very surprised if anyone here understand what exactly the requirement here is.
But whatever it is, surely you can do it in Python. You could do stuff like this in any (modern) language.
 
Aha. I was wondering why you named the thread like that.
You description is real confusing... I'd be very surprised if anyone here understand what exactly the requirement here is.
But whatever it is, surely you can do it in Python. You could do stuff like this in any (modern) language.
Hello, could you please explain what do you think is confusing ?
 
Hello, could you please explain what do you think is confusing ?
Each of these sentences:

The server will have to list groups of numbers that are in multiple groups of numbers. Each groups of numbers has a unique integer ID. The ID is part of its group. As you can see the list #2 doesn't contain the number 5 and vice versa so they don't get in the same output lists.

Rather than me explaining all the unclear things, I think you should sit down and restate your problem in a way that can be understood. It's probably clear enough to you, but try putting yourself in the position of someone who does not know what you want. When formulating a problem, it's best to take nothing for granted and leave nothing to chance.
 
Each of these sentences:

The server will have to list groups of numbers that are in multiple groups of numbers. Each groups of numbers has a unique integer ID. The ID is part of its group. As you can see the list #2 doesn't contain the number 5 and vice versa so they don't get in the same output lists.

Rather than me explaining all the unclear things, I think you should sit down and restate your problem in a way that can be understood. It's probably clear enough to you, but try putting yourself in the position of someone who does not know what you want. When formulating a problem, it's best to take nothing for granted and leave nothing to chance.
Thank you
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom