top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

In Python, How to extract the Object and print all the attributes?

0 votes

I need to print the Dictionary in a detailed way.

Current When am print the dictionary am getting like below.

<Details.Value: object at 0x0000027062245160>
posted Jan 3, 2019 by Nikita Sehgal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Using __dict__ you can print with all attributes.


employeeList = {'name':'John','age':28}

print (employeeList .__dict__)
answer Jan 3, 2019 by Mishthy Mukherjee
Similar Questions
+3 votes

I am trying to count the number of files in a folder with python script but not getting the appropriate script. In which I can change the path and can find out the count of other folder files.

It doesn't matter for me how long the script is but need the clear script and it would be better if you can explain it also.

+3 votes

I have the following script however when the clipboard contents are greek letters it fails to print them right.
I have used all posible encoding for greek letters including utf8 but to no avail so i just stay with latin1.

Can you suggest a solution?

Here is the script:

import win32clipboard
data = win32clipboard.GetClipboardData()
data = data.decode('latin1')
send = 'ccc|=:='+data
print data
print send 
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.