Multiple files for one argument in argparse Python 2.7
问题 Trying to make an argument in argparse where one can input several file names that can be read. In this example, i'm just trying to print each of the file objects to make sure it's working correctly but I get the error: error: unrecognized arguments: f2.txt f3.txt . How can I get it to recognize all of them? my command in the terminal to run a program and read multiple files python program.py f1.txt f2.txt f3.txt Python script import argparse def main(): parser = argparse.ArgumentParser()