I'm not getting it that why is it printing none as output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I'm not getting it that why is it printing none as output?

https://code.sololearn.com/c0zf0piVQXCO/?ref=app

26th Apr 2022, 3:57 PM
Kaushik
Kaushik - avatar
2 Answers
+ 6
Hello Kaushik .remove() does not return a value, so you get "None". It just removes the element and changes your list. lower_case.remove(first_number) print(lower_case)
26th Apr 2022, 4:13 PM
Denise Roßberg
Denise Roßberg - avatar
+ 4
remove() works in-place, it doesn't return anything.
26th Apr 2022, 4:14 PM
Lisa
Lisa - avatar