美文网首页
Python 4 Programming Tutorial -

Python 4 Programming Tutorial -

作者: 豆表示低调 | 来源:发表于2016-08-30 00:18 被阅读0次
    >>> user = "Tuna McFish"
    >>> user[0]
    'T'
    >>> user[5]
    'M'
    >>> user[-1]
    'h'
    >>> user[-3]
    'i'
    >>> user[2:7]
    'na Mc'
    >>> user[:7]
    'Tuna Mc'
    >>> user[2:]
    'na McFish'
    >>> user[:]
    'Tuna McFish'
    >>> print('dsadasd')
    dsadasd
    >>> len('dfjhf22893hfsdfjkasdf')
    21
    >>> len(user)
    11
    

    相关文章

      网友评论

          本文标题:Python 4 Programming Tutorial -

          本文链接:https://www.haomeiwen.com/subject/myaxettx.html