Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Check the memory usage of an object in python
Home
Python
Check the memory usage of an object in python
0
votes
asked
May 24, 2020
in
Python
by
SakshiSharma
Check the memory usage of an object
#python-memory
#memory-python
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 24, 2020
by
Robindeniel
import sys
x = 10
print(sys.getsizeof(x))
Output:
1
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: How memory is managed in Python?
asked
Dec 31, 2020
in
Python
by
SakshiSharma
#memory-management
#python-memory
Python-questions-answers
0
votes
Q: How Does Python Manage The Memory?
asked
Dec 19, 2019
in
Python
by
sharadyadav1986
#python-memory
Python-questions-answers
0
votes
Q: What are Usage of OK_ and EQ_ in NOSE Python?
asked
Jul 14, 2020
in
Python
by
GeorgeBell
#python
Python-questions-answers
+1
vote
Q: How can an object be copied in Python?
asked
Feb 13, 2021
in
Python
by
SakshiSharma
python-object
object
object-copy
python
Python-questions-answers
0
votes
Q: How can you copy an object in Python?
asked
Jan 1, 2021
in
Python
by
SakshiSharma
#python-object-copy
Python-questions-answers
0
votes
Q: How Do You Copy An Object in Python?
asked
Jun 28, 2020
in
Python
by
Robindeniel
#python-object
#object-python
Python-questions-answers
0
votes
Q: How we can copy an object in Python?
asked
Jun 11, 2020
in
Python
by
Robindeniel
#python-object-copy
#copy-object-python
Python-questions-answers
0
votes
Q: How do you copy an object in Python?
asked
May 17, 2020
in
Python
by
SakshiSharma
#python-object-copy
#object-copy-python
Python-questions-answers
0
votes
Q: What Are The Different Methods To Copy An Object In Python?
asked
Dec 22, 2019
in
Python
by
rajeshsharma
#python-object
Python-questions-answers
0
votes
Q: Whenever Python exits, all the memory isn’t deallocated. Why is it so?
asked
Oct 12, 2021
in
Python
by
rajeshsharma
python-exits
Python-questions-answers
...