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

Mitya Sirenef msirenef at lightbird.net
Wed Apr 24 17:29:53 CEST 2013


On 04/24/2013 10:59 AM, Sydney Shall 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
>

That's exactly right, you can also use *= , +=, -=, |=, &= and
maybe there are others?  -m


-- 
Lark's Tongue Guide to Python: http://lightbird.net/larks/



More information about the Tutor mailing list