Python Forum
Two loops behaving differently
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two loops behaving differently
#6
In the posed code both variants print a = 1. I do not think the code you posted accurately represents the code you are trying to debug. Please post the code that is not printing a = 1. Configure the code to not print = 1. Run the code on your notebook to verify it does not print a = 1. Copy the exact and post the code without any further edits.

When you post the code use python tags (use the button provided in the editor window) to retain indentation.
Reply


Messages In This Thread
Two loops behaving differently - by DavidTheGrockle - Dec-26-2020, 03:24 PM
RE: Two loops behaving differently - by deanhystad - Dec-26-2020, 08:05 PM
RE: Two loops behaving differently - by deanhystad - Dec-27-2020, 03:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  ConfigParser(dict_type=) not behaving as expected malonn 5 3,300 Sep-08-2022, 08:42 AM
Last Post: malonn
  List comprehension used differently coder_sw99 3 1,722 Oct-03-2021, 04:12 PM
Last Post: coder_sw99
  if condition not behaving as expected EricBHK 10 3,810 May-16-2020, 03:41 PM
Last Post: EricBHK
  Hash command works differently for me in CMD and Spyder ZweiDCG 3 2,352 Sep-10-2019, 01:10 PM
Last Post: DeaD_EyE
  Requests not behaving... PythonLamer 1 4,805 Dec-01-2017, 06:45 PM
Last Post: nilamo
  Why does Function behave differently in a class vs. outside a class? Leaf 4 3,691 Nov-30-2017, 11:13 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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