+ 1

Python format string

What is wrong about this code. I get an error (parseError on Line 2): my_hair = 'Brown' print(f"Let's talk about my {my_hair} hair.")

6th Oct 2018, 11:45 AM
Darwin
4 Respostas
+ 6
I just copy-pasted your code and it seems to work fine in Playground. If you use it outside of Sololearn, make sure that python version >= 3.6 is used. f strings didn't exist before.
6th Oct 2018, 11:59 AM
Anna
Anna - avatar
+ 2
Jdoodle has Python 3.6.5, and many other languages. https://www.jdoodle.com/python3-programming-online But other than Sololearn app and Sololearn website, I don't know of any online editor supporting Python 3.7.
6th Oct 2018, 12:31 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 1
Thank you Anna, i use an online editor which gave me the error. https://python.codnex.net Can you recomand An online editor which supports >=3.6
6th Oct 2018, 12:03 PM
Darwin
+ 1
Thanks Kishalaya, jdoodle is good enough for now.
6th Oct 2018, 1:00 PM
Darwin