while True:
try:
n = int(raw_input())
print "n = " , n
except:
break
king = [] # defines king to be an array
n=0
while True:
name = raw_input()
if len(name) < 1:
break
king.append(name)
n += 1
# now n == the number of names read
for i in range(n):
print '\t' , i+1 , ". " , king[i]
'''
Note : you need input.txt in same directory for the program to run without any errors.
'''
infile = open("input.txt","r")
outfile = open("output.txt","w")
for i in infile:
s = i.title()
outfile.write(s)
infile.close()
outfile.close()
'''Note: You need the files - north.dat, south.dat, combined.dat in the same directory for the program to run without any errors'''
fin1 = open("north.dat","r")
fin2 = open("south.dat","r")
fout = open("combined.dat","w")
file1 = []
file2 = []
for i in fin1:
try:
s = i.split(" ")
for j in s:
file1.append(int(j))
except:
continue
for i in fin2:
try:
s = i.split(" ")
for j in s:
file2.append(int(j))
except:
continue
for i in sorted(file1 + file2):
fout.write(str(i) + " ")
fin1.close()
fin2.close()
fout.close()
def print_(oss):
print 'oss.str() = "' , str(oss) , '"'
s="ABCDEFG"
n=33
x=2.718
l = ''
print_(l)
l += s
print_(l)
l += ( " " + str(n) )
print_(l)
l += ( " " + str(x) )
print_(l)
def print_(iss,s='',n=0,x=0.0):
print 's = "' , s , '", n = ' , n , ", x = " , x, ', iss.str() = "' \
, iss , '"'
s=""
n=0
x=0.0
l = ''
iss = "ABCDEFG 44 3.14"
print_(iss)
s = "ABCDEFG"
print_(iss,s)
n = 44
print_(iss,s,n)
x = 3.14
print_(iss,s,n,x)