标签:
>>> map(int,‘0‘) [0] >>> int(‘-1‘) -1 >>> map(int, l[1]) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: ‘.‘ >>> map(int, ‘-1‘) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: ‘-‘ >>> map(int, ‘1.0‘) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: ‘.‘ >>> int(‘1.0‘) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: ‘1.0‘ >>> map(int, [‘1.0‘]) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: ‘1.0‘ >>> map(int, [‘-1‘]) [-1]
标签:
原文地址:http://www.cnblogs.com/monne/p/4254762.html