8

Why am I getting this error

Why am I getting this error (see linting) saying 'End of statement expected' in pycharm?

6
  • 5
    If python 3, then try print(x)
    – niraj
    Jun 5, 2018 at 5:19
  • 1
    Yes I am using python 3.x and that worked. Thank you! @student Please add this as answer, I will accept
    – JavaYouth
    Jun 5, 2018 at 5:21
  • 1
    In python 3.x you have to use print(x). Read the differences between python 2.x and python 3.x on net Jun 5, 2018 at 5:22
  • 1
    For details you can look into stackoverflow.com/questions/25445439/…
    – niraj
    Jun 5, 2018 at 5:25
  • This looks like duplicate to link above not sure if you can mark it duplicate.
    – niraj
    Jun 5, 2018 at 5:31

1 Answer 1

22

Try print with parenthesis in Python3 i.e. print(x) instead of print x

Not the answer you're looking for? Browse other questions tagged or ask your own question.