Every line of 'python loop list' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
359 def test_ListCompInLoop(self): 360 code = "def foo(i):\n for j in i:\n [k for k in j]" 361 if sys.version_info.major == 2: 362 self.checkLocals(code, ["i", "j", "k"]) 363 else: 364 self.checkLocals(code, ["i", "j"])
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code