On 04/24/2013 10:59 AM, Sydney Shall wrote:
//I am a beginner just learning Python.


Welcome to the mailing list.  I hope you enjoy your experience with 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)


As the others have said, that's exactly right, at least if totalViruses[i] is immutable, like an int or a float.

It's a subtle distinction, but for now, just remember that it's true for "numbers", but that somebody might redefine one of these operators for other object types. They could not do that for numbers, however.


--
DaveA
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to