(1)索引和切片
users = ('root','westos','redhat')
passwds = ('123','456','789')
print(users[0])
print(users[-1])
print(users[1:])
print(users[:-1])
print(users[::-1])
users = ('root','westos','redhat')
passwds = ('123','456','789')
print(users * 3)
users = ('root','westos','redhat')
passwds = ('123','456','789')
print(passwds + ('012','230'))
users = ('root','westos','redhat')
passwds = ('123','456','789')
print('redhat' in users)
print('redhat' not in users)
for user in users:
print(user)
for index,user in enumerate(users):
print('第%d个用户: %s' %(index+1,user))
for user,passwd in zip(users,passwds):
print(user,':',passwd)