Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
None problem
#2
You are calling the function from a print() function, which expects a return value, doesn't receive one, so prints a default of None.

def printbeam():
    print('+----')
 
def printtwice():
    for _ in range(10):
        printbeam()
    return 'hello'
 
print(printtwice())
Return something, all call directly without print().
I am trying to help you, really, even if it doesn't always seem that way
Reply


Messages In This Thread
None problem - by OmarSinno - Oct-14-2017, 11:42 AM
RE: None problem - by gruntfutuk - Oct-14-2017, 12:05 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020