摘要:
list_a = [1, 2, 3] list_d = [i for i in list_a]#[1, 2, 3] list_e = [i*j for i in list_a for j in list_c]#[4,5,6,10,12,12,15,18] list_f = [i*j for i,j 阅读全文
摘要:
python中保留n位小数,可以使用round 函数 a = 34.564636856845754print(round(a, 2))print(round(a, 3)) 阅读全文
摘要:
from django.test import TestCase# Create your tests here.class A: def __init__(self): self.a = "a" print("A")class B: def __init__(self): self.b = "b" 阅读全文