初学python的常见问题

1.在pycharm中切换python版本的方法

python 调用super()初始化报错“TypeError: super() takes at least 1 argument”
解决方法将python2.7换成python3
在pycharm中切换python版本的方法

2.python中不写;

3.python:很重要不要忘记写

4.未设置编码格式

python出现SyntaxError: Non-ASCII character ‘\xe6’ in file 打印日期.py on line 1, but no encoding declared;
添加链接描述

5.字符串处理

官方文档

猜你喜欢

转载自blog.csdn.net/joey_ro/article/details/108955761