'getting file path from command line argument in python with an argument -i

python3 test1.py -i /home/server/Desktop/json1.json

Can anyone guide me how can I get file path if we pass file from command line argument I need to specify -i in command line with the path



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source