I'm working on a project and for this I need to open a file. So for this I wanted to use open("my_file", "r") but the problem is that the name of the file is dynamic, it could be toto.txt or jziop.txt I no matter how the user will call it. I know in C I would just use open with the av[1] but is it possible in python ? I'm new in it so I'm learning.
Thanks
sys.argv[1]. Command line arguments can be accessed fromsts.argv[]array.fname = sys.argv[1]- just use it