Python Data Science Jobs & Interviews
20.6K subscribers
192 photos
4 videos
25 files
335 links
Your go-to hub for Python and Data Science—featuring questions, answers, quizzes, and interview tips to sharpen your skills and boost your career in the data-driven world.

Admin: @Hussein_Sheikho
Download Telegram
Interview question

What is a generator in Python?

Answer: A generator is a special type of function that returns an iterator using the `yield` keyword instead of `return`. It allows you to generate a sequence of values lazily, meaning values are produced on-demand rather than all at once. This saves memory and improves performance when dealing with large datasets.

tags: #python #interview #generator #iterator #programming

By: t.iss.one/DataScienceQ 🚀