首页 > 其他 > 详细

元祖在命令行里的操作

时间:2019-01-07 11:51:24      阅读:184      评论:0      收藏:0      [点我收藏+]


C:\Users\太阳之泪>python
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> test = (1,2,3)
>>> print(test)
(1, 2, 3)
>>> test = (1)
>>> print(test)
1
>>> type(test)
<class ‘int‘>
>>> test = (1.)
>>> type(test)
<class ‘float‘>
>>> test = (1,)
>>> type(test)
<class ‘tuple‘>

元祖在命令行里的操作

原文:https://www.cnblogs.com/antique/p/10232367.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!