简体   繁体   中英

What's wrong with the syntax in Python in Google Colab in my google accunt?

For a week now I have noticed this in my account on different notebooks. the situation with the syntax. Python stopped seeing f-lines. And the print function began to display everything in brackets for some reason. 在此处输入图片说明

在此处输入图片说明

You could actually narrow this code down to:

>>> print(f'{x=}')
x=5
>>> 

它不起作用的原因是因为您使用的是 Python 2。如您在此处或在此答案中所见,Python 3.6 中添加了 F 字符串,因此它们在任何旧版本的 Python 中都不起作用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM