Results
Search Results
Post Author Forum Replies Posted [asc]

 okay. This for is not necessery here. It is sorted out
quest General Coding Help 1 105 Jul-30-2021, 09:24 AM

 Hello, I am trying to produce 100 different names (names should be unique) and I wrote this simple code: import names parties=[] nss=100 while len(parties) < nss: for i in range(nss): ...
quest General Coding Help 1 105 Jul-30-2021, 09:12 AM

 okay, problem has been solved: for k,v in list(od.items()): print(k,v) finalarray[k]=v
quest General Coding Help 4 133 Jul-29-2021, 01:32 PM

 (Jul-29-2021, 01:59 AM)Larz60+ Wrote: I think what you wanted was (line 1): od = OrderedDict([(0, 1), (1, 1), (3, 1), (7, 1), (36, 1)])and assuming this code is in same script: finalarray=np.zeros(6...
quest General Coding Help 4 133 Jul-29-2021, 09:49 AM

 Hello, I have this dict: od = OrderedDict([(0, 1), (1, 1), (3, 1), (7, 1), (36, 1)])And I am plotting this array with the following line: plt.bar(range(len(od)), list(od.values()), align='center') pl...
quest General Coding Help 4 133 Jul-28-2021, 11:03 PM

 Hello, I have pairs list: pairs=[[A,B],[C,D],[Z,X]]And I have also a queue list which is includes: queue =[A,B,C,D,E,F,G,H,I,Z,X,J,K,L]And I want to make groups from list queue and this groups should...
quest General Coding Help 2 230 Jul-11-2021, 08:35 AM

 (May-11-2021, 10:51 AM)perfringo Wrote: Python documentation, The return statement: Quote:return may only occur syntactically nested in a function definition, not within a nested class definition. ...
quest General Coding Help 4 621 May-11-2021, 11:25 AM

 Hello, I am trying to run this code. The idea is to compare all elements in the list with another single element. If they are same, process and delete and return the last value. If they are not same ...
quest General Coding Help 4 621 May-11-2021, 10:28 AM

 Hello I want to compare string and bool. Here is my function: def MyFunction(qbt, Pauli): if qbt.QEO.state[0]=='Bell': ... elif qbt.QEO.state==False: qbt.QEO.state=False els...
quest General Coding Help 1 458 May-02-2021, 10:24 AM

 (Apr-30-2021, 12:41 PM)Larz60+ Wrote: Fix indentation Show complete unaltered error traceback (wrapped with bbcode error tags) Show contents of nextlist (after line 1 has executed) it is alread...
quest General Coding Help 2 782 Apr-30-2021, 07:37 PM

 Hello I have this list: Output:[((7.2, <__main__.bit object at 0x7f341d8b8700>), <__main__.port object at 0x7f344082cd00>), ((5.5, <__main__.bit object at 0x7f341d8b8790>), <__ma...
quest General Coding Help 2 782 Apr-30-2021, 09:18 AM

 This is my list: list_of_lists = [[1, 2], [3, 4]]I want to group of elements of sublists: list_of_lists = [[1, 2], [3, 4]] n=[] for list in list_of_lists: n.append(list[0]) #I am taking 1 and 3 ...
quest General Coding Help 2 422 Apr-26-2021, 11:15 AM
Post: Create Dynamic For Loop

 Hello My number of sublists is in this line: number_of_sublist=sum(len(x) for x in incoming) And I want to create a for loop till the this number. For instance if number_of_sublist=2, ...
quest General Coding Help 3 483 Apr-26-2021, 10:55 AM

 (Apr-20-2021, 09:13 AM)buran Wrote: From what you show a is a tuple. so just a[0] thanks!!
quest General Coding Help 2 507 Apr-20-2021, 09:28 AM

 I have this object: a=(994.7, <__main__.bit object at 0x7f35b7f2c220>)And I am trying to get just 994.7 so I am using this: a[0][1]But I have float object is not sunbscriptable error HOw can I...
quest General Coding Help 2 507 Apr-20-2021, 08:53 AM

 Hello, I want to plot multiple curve in sale plot line here: [Image: https://queirozf.com/entries/matplotlib-...ing-legend] example My x and y values are depend on another third variable. number_...
quest General Coding Help 0 432 Apr-18-2021, 10:29 AM

 Hello, I have a class and inside this class I have this function: def ff(self, timelimit): while self.lasttime < timelimit : ... do your stuff self.othe...
quest General Coding Help 1 463 Apr-15-2021, 10:25 AM

 (Apr-14-2021, 03:29 PM)klllmmm Wrote: Hope this helps A = [(7.5,), (17.5,), (22.5,), (25.0,), (27.5,), (30.0,), (37.5,), (40.0,)] B = [(17.5,), (22.5,), (25.0,), (27.5,), (30.0,), (37.5,), (40.0,), ...
quest General Coding Help 4 618 Apr-14-2021, 03:57 PM

 (Apr-14-2021, 03:29 PM)klllmmm Wrote: Hope this helps A = [(7.5,), (17.5,), (22.5,), (25.0,), (27.5,), (30.0,), (37.5,), (40.0,)] B = [(17.5,), (22.5,), (25.0,), (27.5,), (30.0,), (37.5,), (40.0,), ...
quest General Coding Help 4 618 Apr-14-2021, 03:33 PM

 Hello I have this list: A [(7.5,), (17.5,), (22.5,), (25.0,), (27.5,), (30.0,), (37.5,), (40.0,)] B [(17.5,), (22.5,), (25.0,), (27.5,), (30.0,), (37.5,), (40.0,), (42.5,)] I want to find number of s...
quest General Coding Help 4 618 Apr-14-2021, 03:17 PM

User Panel Messages

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