79538444

Date: 2025-03-27 09:49:18
Score: 1
Natty:
Report link

I found another difference:

a = [1]
def func():
    a.extend([2])
func()
a = [1]
def func():
    a += [2]
func()

The Python interpreter seems to assume that a is a local variable through a += [2].

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Edward Wang