Search Placementyogi.com
 
2

What would len(2 ** 1000000) print in python?

A.

Stack Overflow

B.

print the value

C.

count the digits in the result

See Answer & Explanation Lets Discuss
Correct answer is : C
Explanation

Python automatically provides extra precision for large integers hence no overflow occurs.

 

Satyam 9/16/2014 11:16:08 AM

But i think length(len()) is a method of string not int or long.

Preview

Thanks for posting your comment! It will be visible soon!
Post Another Comment

6
+
2
=

Name:
Email :
Banner to LogicGuns.com

Hide Page Information