Is there any long int in Python3? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Is there any long int in Python3?

when I tried something like 17,8,4,3,2 It shows max value is 8 rather than 17. why it's not predicting more than 10? https://code.sololearn.com/ctty6r9zo4DH/?ref=app

3rd Aug 2017, 3:38 AM
Girish Tulabandu
Girish Tulabandu - avatar
6 Answers
- 1
Now its working fine....I just increased my limit😂
3rd Aug 2017, 4:23 AM
Girish Tulabandu
Girish Tulabandu - avatar
+ 5
Python 3 switches to BigNum automatically once the number exceeds sys.maxsize
3rd Aug 2017, 3:40 AM
Kirk Schafer
Kirk Schafer - avatar
+ 4
Ok, well... the problem you had was comparing strings: z = [x for x in input('\n'+": ").split(',')] "17" < "8" "79" < "8" "80" > "8" z = [int(x) for x in input('\n'+": ").split(',')] ...works correctly
3rd Aug 2017, 4:27 AM
Kirk Schafer
Kirk Schafer - avatar
+ 2
print(2**1024) # Will give you about 8 lines of numbers (full precision) As for your program... I've been trying to find someone;s question for a code I just published and it vanished... so I'll look at yours :)
3rd Aug 2017, 4:06 AM
Kirk Schafer
Kirk Schafer - avatar
+ 2
Fyi, 79,8,4,3,2 -> doesn't work 80,8,4,3,2 -> works
3rd Aug 2017, 4:10 AM
Kirk Schafer
Kirk Schafer - avatar
+ 1
thnq @kirk , bt when I tried, Its not :(
3rd Aug 2017, 3:47 AM
Girish Tulabandu
Girish Tulabandu - avatar