Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My python interpreter does not recognize strings

Newbie disclaimer: I am new to Python and just started using IDLE to play around with Python.

My problem is the interpreter does not recognize strings, whether enclosed in ¨¨ or ´´.

I configured IDLE to use UTF-8. but it does not seem to be an IDLE issue. What I tried is to test this string in the interpreter directly. It does not work.

print ¨Money¨

to the interpereter returns

File "<stdin>", line 1 print ¨Money¨ ^ SyntaxError: invalid syntax

Can someone help me with this? I am using a new laptop running fedora15 with the international keyboard layout and python version is 2.7.1.

like image 336
hAcKnRoCk Avatar asked Aug 09 '26 18:08

hAcKnRoCk


1 Answers

You need to use "" or '', not ¨¨, ´´ or any other fancy characters.

like image 183
wRAR Avatar answered Aug 11 '26 09:08

wRAR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!