橘子味的心
标题:Python3 访问字符串值

Python3 访问字符串值

#!/usr/bin/python3

var1 = 'Hello World!'
var2 = "Python Programming"

print ("var1[0]: ", var1[0])
print ("var2[1:5]: ", var2[1:5])

目录

分类