Python Forum
Two exact "Fors" giving me different results?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two exact "Fors" giving me different results?
#2
the indentation of lines 13 and 14. In the first snippet they are inside the loop, so they get printed with every iteration. In the second snippet they are printed once - after the loop execution has completed

Indentation matters in python
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Two exact "Fors" giving me different results? - by buran - May-04-2020, 12:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question in this code, I input Key_word, it can not find although all data was exact Help me! duchien04x4 3 1,148 Aug-31-2023, 05:36 PM
Last Post: deanhystad
  Matching Exact String(s) Extra 4 2,015 Jan-12-2022, 04:06 PM
Last Post: Extra
  replace exact word marfer 1 6,369 Oct-11-2021, 07:08 PM
Last Post: snippsat
  Assistance with running a few lines of code at an EXACT time nethatar 5 3,401 Feb-24-2021, 10:43 PM
Last Post: nilamo
  Search Results Web results Printing the number of days in a given month and year afefDXCTN 1 2,301 Aug-21-2020, 12:20 PM
Last Post: DeaD_EyE
  Exact Match Kristenl2784 2 2,979 Jul-26-2020, 03:29 PM
Last Post: Kristenl2784
  Redirection giving faulty results monstrup 5 2,573 Jul-19-2020, 07:11 AM
Last Post: Gribouillis
  How to append one function1 results to function2 results SriRajesh 5 3,269 Jan-02-2020, 12:11 PM
Last Post: Killertjuh
  Confusion in exact term used for ? ift38375 2 2,631 Jul-22-2019, 08:58 AM
Last Post: buran
  Finding exact phrase in list graham23s 2 2,985 Mar-13-2019, 06:47 PM
Last Post: graham23s

Forum Jump:

User Panel Messages

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