Five lines are correct :
GO #Fixed
EXEC sys.sp_cdc_enable_table #Fixed
@source_schema = N'RWAW3', #Fixed
@source_name=N'TUY1 #Variable
@role_name = NTEDULL #Fixed
I have 300 codes, 100 of which are missing some fixed lines My program recognizes lines that contain variable values, and I want to combine them with fixed lines 300 times
mylines = []
fname = input("Enter file name: ")
with open (fname) as myfile:
for myline in myfile:
mylines.append(myline)
l1 = mylines[0]
l2 = mylines[1]
l3 = mylines[2]
l4 = mylines[3]
l5 = mylines[4]
tl1 = mylines.count(l1)
tl2 = mylines.count(l2)
tl3 = mylines.count(l3)
tl4 = mylines.count(l4)
tl5 = mylines.count(l5)
print(l1.strip () , tl1)
print(l2.strip () , tl2)
print(l3.strip () , tl3)
print(l4.strip () , tl4)
print(l5.strip () , tl5)
al = len(mylines)
t = [tl1,tl2,tl3,tl4,tl5]
t.remove(1)
cn= min(t)
cocm = max(t)
cncm = cocm - cn
tl = cn * 5
print('\nMissing lines:' , cncm)
print('Salting, Go to code:' , tl)
lst = list()
for line in fh:
word= line.rstrip().split()
for element in word:
if element in lst:
continue
else :
lst.append(element)
Required 1- :
cocm=312
print(l1\n,l2\n,l3\n,lst[0}\n,l5)
Repeated 312 (cocm) times As the value in the lst() changes in ascending order
Required 2-:
tl4 = mylines.count(l4)
print(tl4)
>>> 1
The program recognized the line l4 as a variable so it added in the lst() menu I want to know the position when printing