关于#python#的问题:请问:当我输入的x在list1中不存在时我想要输出的是将x加入到list1中后的结果,为什么输出是None

请问:当我输入的x在list1中不存在时我想要输出的是将x加入到list1中后的结果,为什么输出是None?代码哪里出错了?谢谢

```python

def judgement(list1,x):
    if x in list1:
        print("{} is existed.".format(x))
        return list1
    else:
        print("{} is not existed".format(x))
        return list1.append(x)
x=input("Please input a animal's name:")
print(judgement(["tiger","lion","sheep","rabbit","dog","cat","panda","deer","python"],x))



```


def judgement(list1,x):
    if x in list1:
        print("{} is existed.".format(x))
        return list1
    else:
        print("{} is not existed".format(x))
        list1.append(x)
        return list1
x=input("Please input a animal's name:")
print(judgement(["tiger","lion","sheep","rabbit","dog","cat","panda","deer","python"],x))

img