Python学习日志【第二章】 (三)

上一篇 / 下一篇  2018-01-04 17:34:41 / 个人分类:学习


database=[['admin','123123'],['zhenglh','121212'],['caiky','123456'],['liuxg','123121']]
name=input('请输入用户名:\n')
password=input('请输入密码\n')
print([name,password] in database)
numbers=[12,23,34,22,11,23,44,567]
print(len(numbers))
print(max(numbers))
print(min(numbers))
print(max(1,2,3))
print(list('helloworld'))
print(list('12345'))
numbers=[1,2,3]
print(numbers)
numbers[0]=0
print('numbers[0]=0')
print(numbers)
del numbers[2]
print('del numbers[2]')
print(numbers)
numbers[0:1]=[2,3]
print('numbers[0:1]=[2,3]')
print(numbers)
numbers.append(4)
print('numbers.append(4)')
print(numbers)
numbers2=[12,123,12,1,2,3]
print(numbers2)
print('numbers+numbers2=')
print(numbers+numbers2)
print('numbers=')
print(numbers)
numbers.extend(numbers2)
print('numbers.extend(numbers2)=')
print(numbers)
print('numbers=')
print(numbers)
print('numbers.count(12)=')
print(numbers.count(12))


TAG: 学习

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

我的栏目

日历

« 2018-06-28  
     12
3456789
10111213141516
17181920212223
24252627282930

数据统计

  • 访问量: 856
  • 日志数: 6
  • 建立时间: 2017-12-06
  • 更新时间: 2018-02-05

RSS订阅

Open Toolbar