Created
March 13, 2014 10:16
-
-
Save nit99kumar/9525677 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = raw_input("enter filename: ") | |
num_of_att = int(raw_input("enter the number of attributes: ")) | |
fob = open(a, 'a') | |
att = raw_input("enter attribute list: ") | |
tempatt = att.split(' ') | |
for i in xrange(num_of_att): | |
fob.write(tempatt[i] + "\t") | |
fob.write("\n") | |
flag = 1 | |
while flag == 1: | |
rec = raw_input("enter record: ") | |
templist = rec.split(' ') | |
for i in xrange(num_of_att): | |
fob.write(templist[i] + "\t") | |
fob.write("\n") | |
flag = input("press 1 to enter another record: ") | |
fob.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment