Python Functions | Sololearn: Learn to code for FREE!

0

Python Functions

str1=input(‘name: ‘) Def func(a): For i in a: Print(i,end=‘ ‘) Print(func(str1)) Answer is: a b c None How can I change the code so I don’t get ‘None’ in answers?

5/4/2021 3:35:13 PM

Mah~

3 Answers

New Answer

0

Remove print() from print(func(str1)). Reason: Your function was returning None.

+2

Instead of print(func(str1)) Just do this func(str1) Without the print statement

0

Thanks!