Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python loop problem
#3
(Jun-17-2020, 04:09 AM)buran Wrote: lines 15 and next are outside the for loop. So it goes over all files in the loop and then only after it exit the loop you write to template and save the resulting file.

Hello,

Can you show me what you mean? I'm not following how it should be set up.

(Jun-17-2020, 04:09 AM)buran Wrote: lines 15 and next are outside the for loop. So it goes over all files in the loop and then only after it exit the loop you write to template and save the resulting file.

I figured out what you meant, and it is running correctly now. Thank you!

Do you know what I would need to add to this script if I only wanted to look at files 1-5, and then 7-10? Would I need to add some type of range loop? Sometimes instead of looking at all 27 files, I might want to only look at a couple of them.
Reply


Messages In This Thread
Python loop problem - by Kristenl2784 - Jun-16-2020, 09:03 PM
RE: Python loop problem - by buran - Jun-17-2020, 04:09 AM
RE: Python loop problem - by Kristenl2784 - Jun-17-2020, 01:01 PM
RE: Python loop problem - by buran - Jun-17-2020, 01:16 PM
RE: Python loop problem - by Kristenl2784 - Jun-17-2020, 05:28 PM
RE: Python loop problem - by buran - Jun-17-2020, 05:56 PM
RE: Python loop problem - by Kristenl2784 - Jun-17-2020, 07:02 PM
RE: Python loop problem - by buran - Jun-17-2020, 07:05 PM
RE: Python loop problem - by Kristenl2784 - Jun-17-2020, 07:25 PM
RE: Python loop problem - by buran - Jun-17-2020, 07:49 PM
RE: Python loop problem - by Kristenl2784 - Jun-18-2020, 03:52 PM
RE: Python loop problem - by buran - Jun-18-2020, 07:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem program runs in a loop jasserin 0 141 May-18-2024, 03:07 PM
Last Post: jasserin
  While Loop Problem Benno2805 1 613 Sep-06-2023, 04:51 PM
Last Post: deanhystad
  Loop reading csv file problem faustineaiden 1 1,612 Dec-11-2021, 08:40 AM
Last Post: ibreeden
  Infinite loop problem Zirconyl 5 3,071 Nov-16-2020, 09:06 AM
Last Post: DeaD_EyE
  Dataframe mean calculation problem: do we have to loop? sparkt 1 2,214 Aug-28-2020, 02:41 PM
Last Post: sparkt
  Problem with append list in loop michaelko03 0 1,718 Feb-16-2020, 07:04 PM
Last Post: michaelko03
  problem with for loop using integers python_germ 5 3,089 Aug-31-2019, 11:42 AM
Last Post: jefsummers
  problem in loop roseojha 3 2,354 Aug-26-2019, 09:03 AM
Last Post: perfringo
  Nested while loop problem + turtle DreamingInsanity 3 3,032 Jul-06-2019, 02:01 PM
Last Post: DreamingInsanity
  Problem Passing Arguement to do loop stephenmolnar 10 4,966 May-13-2019, 02:56 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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