• For creating the iterator functions, Dev and QA testing services utilizing Python creates a special function to return iterator object.
    A ‘Yield’ statement is used in generator function instead of return.

    Below is the syntax:

    def newGenerator():
    print('Here is item1')
    yield 10

    print(‘Here is item2')
    yield 20

    print('Here is item3')
    yield 30

    The difference between yield statement and return statement is that the ‘yield’ pauses a function and continues later on calls whereas the ‘return’ terminates function.
    Also, the generators can be used directly with loops.

    The Best Software Testing Services Company - QASource
    QASource is the leading software app testing company that provides comprehensive and custom software testing solutions. Get started today with a free…
This reply was deleted.
    results->result as $result) { ?>
  1. jobtitle;?>
    company;?>(formattedRelativeTime;?>)city;?>, state;?>
    Welcome to Mobile QA Zone, a Next Generation Software Testing Community.Invite your friends to join this community.Write to us to become a featured member.