Code: Select all
def my_function(myList):
for x in myList:
yield x
y = my_function(my_list)
Code: Select all
def my_second_function(y):
print(y.rfind("name")
Code: Select all
AttributeError: 'generator' object has no attribute 'rfind'.
Code: Select all
def my_function(myList):
for x in myList:
yield x
y = my_function(my_list)
Code: Select all
def my_second_function(y):
print(y.rfind("name")
Code: Select all
AttributeError: 'generator' object has no attribute 'rfind'.