Home > other >  Help bosses
Help bosses

Time:09-21

A return statement, return "done" is what mean

CodePudding user response:

What language? Is a string

CodePudding user response:

The
reference 1/f, February 16 response:
what language? Is a string

Python, it should not be returned string, this statement does not join in the code, the result is the same, don't know what it is

CodePudding user response:

Give you moved to the python section in the post, ask questions to choose corresponding section, relatively more professional

CodePudding user response:

The function returns a string the done

CodePudding user response:

The
reference 4 floor weixin_45417938 reply:
() function returns a string done

Def FIG (Max) :
I, a, b=0, 1
While iA, b=b, a + b
Yield b
I=I + 1
Return "done"

Key=FIG (3)

For j in key:
Print (j)
Return to return to in this code is a string that is what role, and the written statement is not to write up, run the result is the same, is why ah

CodePudding user response:

This is traversing the generator element until finally didn't capture the abnormal value

CodePudding user response:

refer to 6th floor Up_QChen response:
this is traversed until finally didn't capture of an element in the generator abnormal values

Is that if the traverse to the exception will stop the traversal

CodePudding user response:

So, can write a program test

CodePudding user response:

Return is the return value function, you print directly (FIG (Max)) print window will print out the done characters, behind the return statement is brother function value
  • Related