- test.py
import sys
class Test:
l = [[1,3],[2,4]]
a = [1,3]
print(",".join(map(str,a)))
for k,v in enumerate(Test.l):
jmv = ",".join(map(str,v))
if jmv == sys.argv[1]:
print("hit, argv,k",sys.argv[1],k)
- execution
# python3 test.py 1,3
1,3
hit, argv,k 1,3 0
# python3 test.py 3,9
1,3
# python3 test.py 2,4
1,3
hit, argv,k 2,4 1