Chinaunix首页 | 论坛 | 博客
  • 博客访问: 491286
  • 博文数量: 74
  • 博客积分: 750
  • 博客等级: 军士长
  • 技术积分: 1453
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-29 15:59
文章分类
文章存档

2014年(30)

2013年(8)

2012年(36)

分类: Python/Ruby

2014-06-24 19:41:57


>>> mtest = ('one','two', 'three')
>>> mtest
('one', 'two', 'three')
>>> mtest[0]
'one'
>>> two_test = ("one_two_three")
>>> two_test[0]
'o'
>>> num_three = ("one_two_three"l,)
SyntaxError: invalid syntax
>>> num_three = ("one_two_three",)
>>> num_three[0]
'one_two_three'
>>> d = 'one_two_thre',
>>> d
('one_two_thre',)
>>> d[0]
'one_two_thre'
>>> 
阅读(3954) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~