Skip to content

Instantly share code, notes, and snippets.

@jhaubrich
Forked from bjcubsfan/list_loop_over_copy.py
Created December 27, 2011 21:03
Show Gist options
  • Save jhaubrich/1525100 to your computer and use it in GitHub Desktop.
Save jhaubrich/1525100 to your computer and use it in GitHub Desktop.

Revisions

  1. jhaubrich revised this gist Dec 27, 2011. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions list_loop_over_copy.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    HA! You've been forked!

    !/usr/bin/env python
    import pdb

  2. @bjcubsfan bjcubsfan created this gist Dec 27, 2011.
    18 changes: 18 additions & 0 deletions list_loop_over_copy.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    !/usr/bin/env python
    import pdb

    expected_rngs = range(0,10)
    file_list = [0, 1, 2, 3, 4, 5, 6, 8, 9]

    for antenna in expected_rngs[:]:
    print "*********************************************************************"
    print "CHECKING", antenna
    for rng in file_list:
    print "checking", rng
    if rng == antenna:
    expected_rngs.remove(antenna)
    print "removing", antenna
    break
    print "*********************************************************************"
    print "*********************************************************************"
    print expected_rngs