Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: to find in dictionary given parameter 'name' and to output position
Post: RE: to find in dictionary given parameter 'name' a...

(Oct-05-2023, 12:13 AM)Liki Wrote: Is 'Ergebnis' an list?Ergebnis is a dictionary. When you do: for E in Ergebnis: print(E)... only the keys (telephone numbers) are printed. If you want to see a...
ibreeden Homework 10 1,315 Oct-05-2023, 08:27 AM
    Thread: to find in dictionary given parameter 'name' and to output position
Post: RE: to find in dictionary given parameter 'name' a...

You ask what you are doing wrong. The program gives a good result so in that sense nothing is wrong. It depends an what you want it to do. But there are some changes to consider. First: for item in ...
ibreeden Homework 10 1,315 Oct-03-2023, 10:30 AM
    Thread: Help with chaos function
Post: RE: Help with chaos function

Hi @dbrown8978 , I think you found out by now how to print the chaotic numbers side by side, and learned why you should not use "eval()". But now for something completely different. The task was to wr...
ibreeden Homework 11 2,084 Aug-23-2023, 11:56 AM
    Thread: Need help with 'str' object is not callable error.
Post: RE: Need help with 'str' object is not callable er...

The problem is line 716: input = input('Enter the password here:')From the moment this line is executed, the input() function is redefined. It becomes a string with the value of the given password....
ibreeden General Coding Help 4 824 Jul-23-2023, 07:46 AM
    Thread: doubling a number
Post: RE: doubling a number

There is indeed a limit to the number of digits, defined by decimal.MAX_PREC, which is 999.999.999.999.999.999 on 64-bit platforms. So on a system with 4 GB RAM the number of digits will be limited by...
ibreeden General Coding Help 8 1,212 Jul-19-2023, 06:41 AM
    Thread: doubling a number
Post: RE: doubling a number

(Jul-16-2023, 11:25 PM)Skaperen Wrote: so there is nothing to do this already defined in some moduleBut there is, I thought you knew. It is decimal for computations with arbitrary precision. import...
ibreeden General Coding Help 8 1,212 Jul-17-2023, 08:39 AM
    Thread: zipfile module error
Post: RE: zipfile module error

(Jun-30-2023, 09:47 AM)pseudo Wrote: I get errorPlease show the full error message.
ibreeden General Coding Help 3 756 Jun-30-2023, 09:56 AM
    Thread: Error 1064 (42000) when executing UPDATE SQL
Post: RE: Error 1064 (42000) when executing UPDATE SQL

That is weird, everything seems to be correct. Perhaps you should not use the semicolon ( ; ) at the end. The semicolon is primarily used as a statement terminator in client mode. I think you do not n...
ibreeden General Coding Help 7 1,460 May-22-2023, 08:46 AM
    Thread: Error 1064 (42000) when executing UPDATE SQL
Post: RE: Error 1064 (42000) when executing UPDATE SQL

Which database are you using? Please show us your program and the complete error message. You are calling execute_query(). Where is it defined?
ibreeden General Coding Help 7 1,460 May-22-2023, 07:18 AM
    Thread: Database that can compress a column, or all data, automatically?
Post: RE: Database that can compress a column, or all da...

I believe SQL Server can store data compressed, but I have no experience with it. But why don't you just compress the JSON with the gzip or zlib modules and then store it in your database? Of course y...
ibreeden General Coding Help 3 1,162 May-16-2023, 07:54 AM
    Thread: I hate "List index out of range"
Post: RE: I hate "List index out of range"

A common mistake is to change a list over which one is iterating. Are you perhaps doing something like this? mylist = ["one", "two", "three", "four"] for i in range(len(mylist)): removed_item = my...
ibreeden General Coding Help 20 3,302 May-11-2023, 09:38 AM
    Thread: create a function format_date ?
Post: RE: create a function format_date ?

By appending .date() you force the result to be a date, so without time. Just remove this part. Another thing is you have to return a datetime object. But you name it "newdatastring". This is confusi...
ibreeden Homework 7 1,759 Apr-24-2023, 07:15 AM
    Thread: ValueError - Formatting issue when values enter thousands
Post: RE: ValueError - Formatting issue when values ente...

Please provide the complete error stack.
ibreeden General Coding Help 4 1,169 Apr-20-2023, 08:01 AM
    Thread: replacing dict contents
Post: RE: replacing dict contents

I am not sure what you mean, but I guess you want a real copy and not two identifiers referencing the same object. You can use the copy module for this. >>> import copy >>> dict1 = {...
ibreeden General Coding Help 6 1,197 Apr-14-2023, 07:43 AM
    Thread: Problem Calculating GPA
Post: RE: Problem Calculating GPA

(Apr-12-2023, 08:19 PM)FirstBornAlbratross Wrote: but my program calculations are a bit off.Yes indeed. You take each item of the list and call it "grade". for grade in user_grades:But then you comp...
ibreeden Homework 3 1,189 Apr-13-2023, 10:06 AM
    Thread: Extracting Version Number from a String
Post: RE: Extracting Version Number from a String

(Apr-03-2023, 05:45 PM)britesc Wrote: In this case m.group(0) contains the answer I need as the delimiter was - but sometimes it can be a + or : as the final delimeterThen you should use: m = re.sea...
ibreeden General Coding Help 2 1,086 Apr-05-2023, 09:49 AM
    Thread: Math python question
Post: RE: Math python question

Deon has two lists: The input list N and a list of forbidden combinations P. So I guess he wants all permutations of N, but skip forbidden combinations. Am I right @Deonvek ? An efficient way of com...
ibreeden General Coding Help 6 1,144 Apr-05-2023, 07:37 AM
    Thread: Is it Possible to pause a script?
Post: RE: Is it Possible to pause a script?

(Mar-31-2023, 09:58 PM)tester_V Wrote: Is there anything I can do to pause it?Yes, there is a way. In Unix/Linux there is a rich number of signals you can send to a process. I am not sure what is im...
ibreeden General Coding Help 6 1,490 Apr-01-2023, 10:19 AM
    Thread: conditions not working as expected
Post: RE: conditions not working as expected

(Mar-25-2023, 03:23 AM)mbrown009 Wrote: When I do it it is not hitting the conditions as expected.Please be precise. What had you expected and what happens instead?
ibreeden Data Science 13 2,627 Mar-25-2023, 08:38 AM
    Thread: Sorting Data Returned From Database
Post: RE: Sorting Data Returned From Database

(Feb-11-2023, 08:22 PM)Timbo03 Wrote: I did initially try something like that with 3 tables as you suggested, but I think with a large amount of data it was quite slow using a SQL queryI disagree wi...
ibreeden Homework 9 1,983 Feb-12-2023, 11:05 AM

User Panel Messages

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