The problem is getting that when I give the user input value to as an argument, it takes as a string and gives an error.
class Employee():
def details(self,name=[]):
print(
"Name of Employee is:",name[0],
"\nSalary of Employee is:",name[1],
"\nPost of Employee is:",name[2],
"\nLocation of Employee is:",name[3]
)
harry = ["Harry",10000,"Engineer","Gurgoan"]
manish = ["Manish",20000,"Manager","Noida"]
e = Employee()
f = input("Enter name to get details:")
e.details(f)
if I use e.details(harry) and don't use input function it works fine. but I want to get detail of harry by using the input function.