0

I want to print each tuple member on next line

Enter your code here. Read input from STDIN. Print output to STDOUT

import cmath

polar=cmath.polar(complex(raw_input()))
print *polar , sep='\n'

input: 1+2j output: 2.23606797749979 1.1071487177940904 my output: print *polar , sep='\n' ^ SyntaxError: invalid syntax

  • Possible duplicate of [how to use from \_\_future\_\_ import print\_function](https://stackoverflow.com/questions/32032697/how-to-use-from-future-import-print-function) – DeepSpace Jan 25 '19 at 13:59
  • You can't use * expression with the print statement. Also where have you defined sep? – Will_Panda Jan 25 '19 at 14:01

1 Answers1

-1

Try this code in python 3.7 latest version. It is working and no error.

import cmath

polar=cmath.polar(complex(input()))
print (*polar , sep='\n')