Python Functions | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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?

4th May 2021, 3:35 PM
Mah~
Mah~ - avatar
2 Respostas
0
Remove print() from print(func(str1)). Reason: Your function was returning None.
4th May 2021, 4:25 PM
Rahul Saxena
Rahul Saxena - avatar
0
Thanks!
4th May 2021, 3:50 PM
Mah~
Mah~ - avatar