摘要:
``` from collections import Iterable #切片************************
#
#取一个list或tuple的部分元素是非常常见的操作 ,Python提供了切片(Slice)操作符,能大大简化这种操作 li = [1,22,4,5,3,21] l = li[0:2] #取前两个元素 从0个开始,到第二个结束,不包含第二个 print(... 阅读全文
摘要:
``` #python基础知识学习 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import math # print('hello world'); # # name = input('please enter your name :'); # print('hello', name); # print('1024*768=',1024*... 阅读全文