def printAdd(n1, n2):
print (n1+n2)
print(printAdd(3,4))
The result is 7 and None, but why does None come out here? Isn't the result of printAdd(3,4) 7?
python
print(printAdd(3, 4))
1. printAdd(3, 4)
2. Print(3, 4) // 7 Output
3. Return None // None returned because nothing was returned from the printAdd() function
4. Print(None) // None Output
© 2024 OneMinuteCode. All rights reserved.