Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6094
| References | <mailman.1906.1306046523.9059.python-list@python.org> <a6f25b6b-ddfe-435a-9035-5f156888d2b5@glegroupsg2000goo.googlegroups.com> |
|---|---|
| Date | 2011-05-23 16:27 -0400 |
| Subject | Re: Is there a better way to solve this? |
| From | David Robinow <drobinow@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1986.1306182479.9059.python-list@python.org> (permalink) |
On Mon, May 23, 2011 at 2:55 PM, kracekumar ramaraju <kracethekingmaker@gmail.com> wrote: > You can use sizeof function, >>>> a=12234 >>>> b=23456.8 >>>> a.__sizeof__() > 12 >>>> b.__sizeof__() > 16 > So sizeof int is 12 bytes and float is 16 bytes I'm not sure what you're trying to show here, but try the following in Python 3.2 >>> a = 9999 >>> for i in range(5): ... a*= 100000 ... a.__sizeof__() ...
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Is there a better way to solve this? kracekumar ramaraju <kracethekingmaker@gmail.com> - 2011-05-23 11:55 -0700 Re: Is there a better way to solve this? David Robinow <drobinow@gmail.com> - 2011-05-23 16:27 -0400 Re: Is there a better way to solve this? Terry Reedy <tjreedy@udel.edu> - 2011-05-23 18:06 -0400
csiph-web