Jun-06-2018, 12:41 PM
You get None printed because FirstClass.display function does not return anything so it does return the default None.
In your code you print from within the function, so there is no need to print again when calling the function, e.g.
replace
In your code you print from within the function, so there is no need to print again when calling the function, e.g.
replace
print(x.display())
with just x.display()
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs