Ask coding questions

← Back to all posts
variable not passed to function in class
pagir1 (0)

i tried to pass the variable from object to function but its not working. its hard for me to find the real problem in code. i have been doing for like 5 hours, still not found the problem.

Geocube101 (258)

Sorry, i don't get it.
What exactly are you trying to do.

If you're talking about the issue on line 58 with your input then
input() is a function that takes a string as a parameter and returns the user input as a string
You're passing a print function which returns None as a value. Instead, remove the print function and put the string directly into the input function

ind = input("Enter the index number1-4 to remove Elements:>>")

Also, it looks like you plan to use ind as an integer. In this case, you must convert the input value to an integer

ind = int(input("Enter the index number1-4 to remove Elements:>>"))