Generator with Slice assignment trick - #61
Conversation
|
Hey @sohaibfarooqi I appreciate you taking out time to contribute to the collection. However, after reviewing your PR, I found a few mistakes (syntactic and grammatical). Do you mind creating an issue for this example first?, I guess it's more convenient to discuss it out first 馃槄 . There's a similar example already in the collection and I guess we can merge these two somehow. |
|
Hi, I noticed that example I wrote do have some syntactical issues. I will modify it to make it a working example. After that I will open an issue so that we can discuss. Thanks, |
Hi,
I though of contributing to your great collection of python tricks. The example I included is iterating a generator expression after updating the iterable of generator. The trick here is updating the iterable using normal assignment vs slice assignment, which will produce different results.
Also please suggest a cool title if you can :)
Thanks
Sohaib