我的代码中有一个列表,看起来像。L = ['Nickname', '35']
当我尝试i = int(L[2])
捕获异常时
exceptions.ValueError: invalid literal for int() with base 10: ''
我究竟做错了什么?
namesplitted = line.split()
lnum += 1
truename = namesplitted[0]
kills = namesplitted[1]
print kills
>>> 34
i = int(kills[1])