当前位置: 首页 > news >正文

Python 中文双引号 “”

Python 中文双引号 “”

  • 1. SyntaxError: invalid character in identifier
  • 2. Correction
  • References

1. SyntaxError: invalid character in identifier

print('Albert Einstein once said, “A person who never made a mistake never tried anything new.”')
print('Albert Einstein once said, "A person who never made a mistake never tried anything new."')
print("Albert Einstein once said, 'A person who never made a mistake never tried anything new.'")
print("Albert Einstein once said, ‘A person who never made a mistake never tried anything new.’")
print(“Albert Einstein once said, 'A person who never made a mistake never tried anything new.'”)
  File "traceback.py", line 5print(“Albert Einstein once said, 'A person who never made a mistake never tried anything new.'”)^
SyntaxError: invalid character in identifier------------------
(program exited with code: 1)请按任意键继续. . .

2. Correction

print('Albert Einstein once said, “A person who never made a mistake never tried anything new.”')
print('Albert Einstein once said, "A person who never made a mistake never tried anything new."')
print("Albert Einstein once said, 'A person who never made a mistake never tried anything new.'")
print("Albert Einstein once said, ‘A person who never made a mistake never tried anything new.’")
print("Albert Einstein once said, 'A person who never made a mistake never tried anything new.'")
Albert Einstein once said, “A person who never made a mistake never tried anything new.”
Albert Einstein once said, "A person who never made a mistake never tried anything new."
Albert Einstein once said, 'A person who never made a mistake never tried anything new.'
Albert Einstein once said, ‘A person who never made a mistake never tried anything new.’
Albert Einstein once said, 'A person who never made a mistake never tried anything new.'------------------
(program exited with code: 0)请按任意键继续. . .

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/

http://www.lryc.cn/news/405505.html

相关文章:

  • 以太网(Ethernet)
  • Scrcpy adb server version (41) doesn‘t match this client (39); killing...
  • 微服务实战系列之玩转Docker(四)
  • 微信小程序-自定义组件生命周期
  • 2024年7月23日(samba DNS)
  • Hyperledger顶级项目特点和介绍
  • 操作系统——笔记(1)
  • isEmpty() 和 isBlank()的区别
  • scrapy生成爬虫数据为excel
  • vscode debug C++无法输入问题
  • MODBUS tcp学习总结
  • 【第一天】计算机网络 TCP/IP模型和OSI模型,从输入URL到页面显示发生了什么
  • 发现FionaAI:免费体验最新的GPT-4o Mini模型!
  • Linux Gui 窗口对话和窗口操作
  • 人工智能驾驶技术:引领未来道路
  • 管理的核心是管人,管人的核心就是这3条,看懂的是高手
  • 代码解读:Diffusion Models中的长宽桶技术(Aspect Ratio Bucketing)
  • Linux下如何使用GitLab进行团队协作
  • 无法连接到internet怎么办?已连接但无internet访问,其实并不难
  • 建投数据人力资源系列产品获得欧拉操作系统及华为鲲鹏技术认证书
  • 【iOS】——属性关键字的底层原理
  • 电影类平台如何选择服务器
  • 递归神经网络(RNN)及其预测和分类的Python和MATLAB实现
  • 以flask为后端的博客项目——星云小窝
  • CUDA编程02 - 数据并行介绍
  • Android 视频音量图标
  • VScode 修改 Markdown Preview Enhanced 字体以及大纲编号
  • TCP的FIN报文可否携带数据
  • 【GoF23种设计模式+简单工厂模式】
  • 北醒单点激光雷达更改id和波特率以及Ubuntu20.04下CAN驱动