,): shixin=chr() print(shixin) -------------------结果:2) for i in range(0,10): shixin=chr(9679) print(shixin,end="")------------结果: 3) for i in range(0,10): shixin=chr(9679)+" " print(shixin,end="")----------------结果: ) ,): ko…
i = 0 while i < 5: # print('*****') 效果与下行相同 print('*'*5) i+=1 print('\n\n') i = 1 while i < 6: print('*'*i) i+=1 print('\n\n') i = 1 while i < 6: print('*'*(6-i)) i+=1…
public class For { public static void main(String[] args) { //"使用双层for循环打印图形时,外层管行,内层管列",那么是怎样的原理呢? 那么举个栗子!看下面: //炒栗子1:利用"*"打印出一个长宽为5的矩形图案 for(int i=1;i<=5;i++){ for(int k=1;k<=5;k++){ System.out.print("*"); } //小知识:pri…
python打印列表的下标和值的例子: In [1]: list01=[1,4,5] In [10]: def funct01(ll): ....: for index,value in enumerate(ll): ....: print index,value ....: In [11]: funct01(list01)0 11 42 5…