[Tutor] totalViruses[i] /= float(numTrials),

Chris “Kwpolska” Warrick kwpolska at gmail.com
Wed Apr 24 17:26:39 CEST 2013


On Wed, Apr 24, 2013 at 4:59 PM, Sydney Shall <s.shall at virginmedia.com> wrote:
>  I am a beginner just learning Python.
>
> I have come across the following usage for the first time.
>
>   totalViruses[i] /= float(numTrials)
>
> Does it mean? ;  totalViruses[i] = totalViruses[i]/float(numTrials)
> --
> Sydney
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

Yup.  Similar expressions exist for other binary operators (+, -, *, etc.)

--
Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
stop html mail                | always bottom-post
http://asciiribbon.org        | http://caliburn.nl/topposting.html


More information about the Tutor mailing list