3/19 PyCharm can't use print ["O"] * 5



When i use the line

print ["O"] * 5

wich correctly prints a list with five capital O's

but when i use the same code in PyCharm it gives me the error

Traceback (most recent call last):
    File "C:/Users/el/PycharmProjects/Battleship!/Battleship_3.py", line 4, in <module>
        print ["O"] * 5
TypeError: 'builtin_function_or_method' object is not subscriptable

Anyone knows what this "not subscriptable" thingy is all about?



I-m back with the answer

when i made another project, the iterpreter started using Python 3.5

It was my mistake :stuck_out_tongue:


I'm using pycharm as well...the answer is simply...in 3.5 print commands need to be inside () ie; print(bob)