我如何在 Python 3 中使用 raw_input [英] How do I use raw_input in Python 3

查看:26
本文介绍了我如何在 Python 3 中使用 raw_input的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

import sys
print(sys.platform)
print(2**100)
raw_input()

我使用的是 Python 3.1 并且无法让 raw_input冻结"dos 弹出窗口.我正在阅读的书适用于 Python 2.5,我使用的是 Python 3.1

I am using Python 3.1 and can't get the raw_input to "freeze" the dos pop-up. The book I'm reading is for Python 2.5 and I'm using Python 3.1

我应该怎么做才能解决这个问题?

What should I do to fix this?

推荐答案

从 Python 3 开始,raw_input() 被重命名为 input().

Starting with Python 3, raw_input() was renamed to input().

来自 Python 3.0 的新增功能,内置部分第二项.

这篇关于我如何在 Python 3 中使用 raw_input的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆