I mean occurrence of 2 from numbers 1 to 100. The number could be the first digit or second digit in a two digit number..for e.g. In number 21 it appears as first digit. For number 92 it appears as second digit On 01-Dec-2013 2:45 PM, "Steven D'Aprano" <st...@pearwood.info> wrote:
> On Sun, Dec 01, 2013 at 11:20:02AM +0530, Reuben wrote: > > Hi, > > > > How can we write a logic for detecting the number 2 in range from 1 to > 100 > > 2 in range(1, 101) > > > -- > Steven > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor