zoukankan      html  css  js  c++  java
  • 关于python 3.x

    拿着本python的书翻翻, 随手试一下程序竟然出错, 原来python 3.x和原来的2.x改了一些东西,让初学者郁闷啊。

    1、print在3.x中成了函数, 要写成print(...)

    2、使用Tkinter的时候, 2.x 写成  from Tkinter import * 。  但是在3.x中就会出错, 需要写成

         from tkinter import *

    3、thread模块的名称被修改为_thread, 所以import thread出错, 要改成import _thread

  • 相关阅读:
    团队冲刺第十天
    每日学习
    每日学习
    团队冲刺第九天
    每日学习
    2021.4.26
    2021.4.23
    2021.4.22
    2021.4.21
    2021.4.20
  • 原文地址:https://www.cnblogs.com/worldreason/p/1542858.html
Copyright © 2011-2022 走看看