QuestionQ106

VerifiedComputer Programming and Python Fundamentals

What output is expected from this code?

print(type(1J))  
Explanation

1J is a complex-number literal, so its type is complex. In Python 2, printing that type displays <type 'complex'>.

Community Discussion

No comments yet. Be the first to start the discussion!