3 examples of 'python square numbers in a list' in Python

Every line of 'python square numbers in a 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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
10def square(numbers, queue):
11 for i in numbers:
12 queue.put(i*i)
Important

Use secure code every time

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

20def is_square( num ):
21 return math.pow( int(math.sqrt(num)), 2 ) == num
4def square(numbers):
5 print("Print squares")
6 for n in numbers:
7 time.sleep(0.2)
8 print("Square", n*n)

Related snippets