def searcher(): import time # Some 4 seconds time consuming task book = "This is a book on harry and code with harry and good" time.sleep(4) while True: text = (yield) if text in book: print("Your text is in the book") else: print("Text is not in the book") search = searcher() print("search started") next(search) print("Next method run") search.send("harry") search.close()
from setuptools import setup setup(name="packageharry", version="0.3", description="This is code with harry package", long_description = "This is a very very long description", author="Harry", packages=['packageharry'], install_requires=[]) class Achha: def __init__(self): print("Constructor ban gaya") def achhafunc(self, number): print("This is a function") return number
Comments
Post a Comment