"Python"의 두 판 사이의 차이
ph
20번째 줄: | 20번째 줄: | ||
==Max integer== | ==Max integer== | ||
sys.maxint | sys.maxint | ||
+ | [http://stackoverflow.com/a/7604981/766330] |
2017년 4월 10일 (월) 10:58 판
is and ==
is is identity testing, == is equality testing. what happens in your code would be emulated in the interpreter like this:
>>> a = 'pub' >>> b = ''.join(['p', 'u', 'b']) >>> a == b True >>> a is b False
Access index in for loop
for idx, val in enumerate(ints): print(idx, val)
Max integer
sys.maxint