If you do a:

     precomp = map(log10,2:10)

Then a oneliner for the first digit is:

     searchsortedfirst(precomp, log10(lista[3])%1.0)

There are many paths in the garden. But this one is not as long (slow) as 
it looks.

On Tuesday, October 27, 2015 at 10:35:18 AM UTC+2, Alireza Nejati wrote:
>
> Michele's solution is preferred here, but you can also do it like this:
>
> string(lista[3])[1]
>

Reply via email to