摘要:
def hello(name): return 'hello, '+name print(hello('jack')) def fibs(num): '计算斐波那契数'#文档字符串 a=[0,1] for i in range(int(num)-2): a.append(a[-1]+a[-2]) return a print(fibs(5... 阅读全文
摘要:
>>> print('name')#只有一个参数 name >>> print('name','age')#空格拼接 name age >>> print('hi'+',','tom')#想某个值没有空格相隔 hi, tom >>> print('name','age','home',sep='_')#指定分隔符 name_age_home >>> 阅读全文
摘要:
>>> f="hi,%a is a %a" #%后面只能跟同一个值 >>> v=('mac','dog') >>> f % v #最原始 "hi,'mac' is a 'dog'" >>> from string import Template >>> tmp=Template('hi, $who is a $what')#引用模块 >>> tmp.substitute 阅读全文
摘要:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Runtime.InteropServices; namespace Print { class PrintStatus { public static int oldPrintId = 0; [StructLayout(L... 阅读全文
摘要:
1 class People 2 { 3 public string A { get; set; } 4 public string B { get; set; } 5 public string C { get; set; } 6 7 8 public override bool Equals(o 阅读全文