glob finds the same file 10 times
glob finds the same file 10 times Question: Why does the recursive=True lead to finding the same file 10 times. >>> for g in glob.glob("/home/result/test/**/**/**/*.xml", recursive=True): … if "testsystems" in g: … print(f"{g}") … /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml /home/result/test/foo/bar/test_results/testsystems.xml According to the docs I expected to need to use recursive=True …