Skip to content

Instantly share code, notes, and snippets.

@rweir
Forked from vvikramjhu/file.py
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rweir/28fef3f03af4aa042db7 to your computer and use it in GitHub Desktop.
Save rweir/28fef3f03af4aa042db7 to your computer and use it in GitHub Desktop.
counta = 0
countb = 0
countc = 0
with open( "a.txt", 'a') as a:
with open( "b.txt", 'a') as b:
with open( "c.txt", 'a') as c:
# Iterate over readlines from myFile.xml and parse data
if ( counta == 300000 ):
with open( "a1.txt" , 'a') as a1:
a1.write()...
if ( countb == ):
if ( countc == ) :
# if the if blocks accessed above then continue without going below to write in a b c
............
a.write()
b.write()
c.write()
counta += 1
countb += 1
countc += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment