Problems when updating a list
21:23 25 Dec 2025

In this experiment I try to add an element to a list. When I enter the target-variable, it is added to the list, but it is separated into its letters. What is the best way to acomplish this? Thank you so much!
the code is:

lista = ["Juan", "Pedro", "Pablo"]
def entername():
    registronom = input("enter name ")
    if registronom == ("lopez"):
        lista.extend(registronom)
        print("go to HR")
    else:
        print("Welcome", registronom)
print(entername())
print(lista)
enter image description here
python list input collections data-analysis