Jul-22-2020, 06:45 AM
(Jul-22-2020, 05:31 AM)buttercup Wrote: I want to print the List of ARFCNs which is available numerous times in the text.
I find it odd that you pasted such a large text segment, but I only see one line with "List of ARFCNs", so when I run your program, I don't really see the problem.
Quote:How can I modify the code so that it prints the list only the first time it appears in text
Once you find the match you want,
break
out of the loop.Quote: and also counts the number of entries in the list?
Split the line on =, then for the second part, split it into a list on spaces. You can then keep the entries around and count them with
len()