Post Reply 
Python, how to input a complex number
04-30-2021, 10:36 AM
Post: #9
RE: Python, how to input a complex number
(04-30-2021 08:55 AM)Stevetuc Wrote:  Since input() returns a string, this also doesn't work.

"Old" python used to return evaluated expression, instead of string.

input(s) ≡ eval(raw_input(s))

Have you tried using eval, instead of complex ?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Python, how to input a complex number - Albert Chan - 04-30-2021 10:36 AM



User(s) browsing this thread: 1 Guest(s)