We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f9c287 commit 7aa909fCopy full SHA for 7aa909f
1 file changed
generators.rst
@@ -157,6 +157,13 @@ iterable. While an ``int`` isn't an iterable, we can use it on string!
157
158
.. code:: python
159
160
+ int_var = 1779
161
+ iter(int_var)
162
+ # Output: Traceback (most recent call last):
163
+ File "<stdin>", line 1, in <module>
164
+ TypeError: 'int' object is not iterable
165
+ # This is because int is not iterable
166
+
167
my_string = "Yasoob"
168
my_iter = iter(my_string)
169
next(my_iter)
0 commit comments