小编Rya*_*ner的帖子

如何设置当前用户的文件路径?

现在对于目录路径,我有:

os.chdir(r'C:\users\Ryan\AppData\Local\Google\Chrome\Application')
Run Code Online (Sandbox Code Playgroud)

我该如何制作它而不是"Ryan"它使用脚本的人的用户名?

python directory filepath

5
推荐指数
2
解决办法
1684
查看次数

当我要求Python将数字乘以100时,它会将数字打印100次?

例如,当我进入时2 * 100,我得到: 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555

为什么是这样?这是我的代码

import math
KeepProgramRunning = True
while KeepProgramRunning:
    print 'Please enter the centimetre value you wish to convert to millimetres '
    a = raw_input()
    print 'The answer is', 
Run Code Online (Sandbox Code Playgroud)

python math

0
推荐指数
2
解决办法
1125
查看次数

标签 统计

python ×2

directory ×1

filepath ×1

math ×1