On Fri, Feb 14, 2020 at 3:10 PM Stefan Ram <r...@zedat.fu-berlin.de> wrote:

>   By trial and error (never read documentation!) I found
>   that you can count the number of e's in a text by just
>
> Counter( text ).get( 'e' )
>
>   (after »from collections import Counter« that is).
>
Even simpler, though not suitable for all situations:
"abcbdbe".count("b")

  The other thing I read in a book. I already knew that one
>   can zip using ... »zip«. E.g.,
>
Neat.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to