You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ap.add_argument("-i", "--inputfiles", dest="inputfiles", help="list of input files to select a random word from", required=False, nargs='+', default=[])
args = ap.parse_args()
cn=[]
for f in args.inputfiles:
with open(f, 'r') as fd:
#filter commented lines
cn.append( random.choice(list(filter(lambda x: not x.startswith("#") and not x.strip()=="",fd.readlines()))).strip() )