'o' -> 'or'
parent
c6ed828343
commit
c3f55abcc3
|
@ -203,7 +203,7 @@ class Solution:
|
|||
tempnode = nList
|
||||
# 用来保存进位值,初始化为0
|
||||
summod = 0
|
||||
while l1 is not None o l2 is not None:
|
||||
while l1 is not None or l2 is not None:
|
||||
# 如果l1的链表为空则l1num为0,若是不为空,则为链表的节点值
|
||||
# 判断是否为空,为空就设为0
|
||||
l1num = 0 if l1 is None else l1.val
|
||||
|
|
Loading…
Reference in New Issue