Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Use one list as search key for another list with sublist of list
Post: RE: Use one list as search key for another list wi...

I got help on other site but I wanted to share the solution just in case anyone else has the same problem. list1 = [['orange', [1, 2, 3]]] list2 = [['apple', [1, 2, 3]], ['banana', [1, 2, 3]], ['pear...
jc4d General Coding Help 4 2,242 Jan-11-2022, 12:10 PM
    Thread: Use one list as search key for another list with sublist of list
Post: RE: Use one list as search key for another list wi...

I tried disecting it but is not taking me far since eventhough it is returning the difference, the result is not "filling back" to what list it belongs, which should return ['pear', [-1, 2, 3]] list1...
jc4d General Coding Help 4 2,242 Jan-11-2022, 10:37 AM
    Thread: Use one list as search key for another list with sublist of list
Post: RE: Use one list as search key for another list wi...

Thank you for your time and answer **smile** I wanted to go further and then compare the first item of the vector's list only so I tried the code bellow but I get a TypeError: S = set(tuple(x[1]) f...
jc4d General Coding Help 4 2,242 Jan-10-2022, 09:19 AM
    Thread: Calling a class from a function
Post: RE: Calling a class from a function

(Dec-15-2021, 10:51 AM)Gribouillis Wrote: No it is not necessary. I wrote the 'pass' in order to give a non empty body to the class definition.Thank you for the explanation. I will do some test now ...
jc4d General Coding Help 5 1,908 Dec-15-2021, 11:46 AM
    Thread: Calling a class from a function
Post: RE: Calling a class from a function

(Dec-15-2021, 08:26 AM)Gribouillis Wrote: I'm not sure if this is what you mean, but yes it is possible >>> class A: ... pass ... >>> def func(): ... a = A() ... print...
jc4d General Coding Help 5 1,908 Dec-15-2021, 10:46 AM
    Thread: Calling a class from a function
Post: Calling a class from a function

Hi all, I'm pretty noob in python hence the question. **blush** Is it possible to call a class from a function? Cheers,
jc4d General Coding Help 5 1,908 Dec-15-2021, 08:04 AM
    Thread: Use one list as search key for another list with sublist of list
Post: Use one list as search key for another list with s...

Hello, I have two lists that returns some vector values with it's own name: list1 = [['orange', [1, 2, 3]]] list2 = [['apple', [1, 2, 3]], ['banana', [1, 2, 3]], ['pear', [-1, 2, 3]], ['kiwi', [-1,...
jc4d General Coding Help 4 2,242 Nov-30-2021, 08:45 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020