Python Forum
Iterating over a dictionary in a for loop - checking code has worked
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Iterating over a dictionary in a for loop - checking code has worked
#2
I expect many here aren't going to be familiar with whichever field this is (atmospheric physics?) and are likely to find it difficult to know what your code is doing. Is it possible to formulate the problem you have in terms of an input and an expected output (into and from a function, say)? That way, you could at least write a unit test to verify that given that input, the output is what you expect.
Reply


Messages In This Thread
RE: Iterating over a dictionary in a for loop - checking code has worked - by ndc85430 - Dec-29-2020, 05:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [WORKED AROUND] Problem installing elitech-datareader, 'cannot import build_py_2to3' NeilUK 4 1,690 Jul-09-2023, 10:01 AM
Last Post: NeilUK
  Python: re.findall to find multiple instances don't work but search worked Secret 1 1,208 Aug-30-2022, 08:40 PM
Last Post: deanhystad
  Nested for loops - help with iterating a variable outside of the main loop dm222 4 1,572 Aug-17-2022, 10:17 PM
Last Post: deanhystad
  For Loop and Use of Brackets to Modify Dictionary in Tic-Tac-Toe Game new_coder_231013 7 2,232 Dec-28-2021, 11:32 AM
Last Post: new_coder_231013
  embold code checking site zahhak 1 1,670 Sep-08-2021, 02:39 PM
Last Post: Larz60+
  Dictionary within html code ebolisa 4 2,589 Aug-09-2021, 11:36 AM
Last Post: ebolisa
  checking for last item in for loop Skaperen 11 4,238 Jul-09-2021, 11:40 PM
Last Post: Skaperen
  Adding to the dictionary inside the for-loop - weird behaviour InputOutput007 5 2,693 Jan-21-2021, 02:21 PM
Last Post: InputOutput007
  Help! I accidentally ran a file without checking the code scaryzane 5 2,959 Dec-30-2020, 09:21 AM
Last Post: DeaD_EyE
  Error while checking for key in Dictionary onenessboy 5 2,665 Aug-14-2020, 01:06 PM
Last Post: onenessboy

Forum Jump:

User Panel Messages

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