Value "none" keeps being returned | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Value "none" keeps being returned

I have this problem in my ASCII conversion project in Which I invoke a class method. the method works perfectly, the only problem is getting rid of the "none" return type at the end. I've tried returning the name, but then the method doesn't iterate properly: could someone help? https://code.sololearn.com/cy5ysFFD54w0/?ref=app

7th Aug 2017, 10:59 AM
X-1
X-1 - avatar
1 ответ
+ 2
None is result of print(method which return nothing), namely, all your numbers are printed by the method, and the method has no returned value, by default it is None. just remove all print , and use just user.method().
7th Aug 2017, 12:07 PM
yuri