#!/usr/bin/env python #-*- coding:utf-8 -*- #打印0001-9999的数字 for i in range(9999): s = "%04d" % i print(s) #循环打印字典 dict1 = {"tom":90,"dgg":100,"sb":-1} for a in dict1: print(a,dict1[a]) #打印dict1的值 for value in dict1.…
源:DataCamp datacamp 的 DAILY PRACTICE + 日常收集. Methods String Methods List Methods 缺一 Methods You can think of methods as functions that "belong to" Python objects. String Methods # string to experiment with: room room = "poolhouse" # U…