Python中常用的其它基本操作

来源:互联网 发布:无限极专属网络电视盒 编辑:程序博客网 时间:2024/05/22 08:12

#要用户手动输入数字或字符串

num = input( "please input the num\n" )

str = raw_input( "please input the str\n" )

nums = map( int , raw_input().split() )

#记录运行时间

import time

start = time.clock()

......

end = time.clock()

print('Running time: %s Seconds'%(end-start))

#判断字母大小写,全是大写则为1

str.isupper()