Created
May 9, 2019 17:47
-
-
Save halfak/06e60ba0cf29c70737f86dea91dea66b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python | |
Python 3.5.3 (default, Sep 27 2018, 17:25:39) | |
[GCC 6.3.0 20170516] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> [i for i, c in enumerate("hello") if c == "e"] | |
[1] | |
>>> [i for i, c in enumerate("hello") if c == "l"] | |
[2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment