1,使用while循环输出1,2,3,4,5,6,8,9 # 使用while循环输出1,2,3,4,5,6,8,9 num = 1 while num <= 10: if num != 7: print (num ) num += 1 num = 1 while num < 10: num +=1 if num ==7: continue print(num) num = 1 while num < 10: num +=1 if num ==7: pass else: print(num…
[Q4] There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). You may assume nums1 and nums2 cannot be both empty. Example 1: nums1 = […
---恢复内容开始--- 元组(tuple)是只读列表,不能修改,列表用中括号,元组用小括号.只能用index和count两个命令. ---恢复内容结束--- 字符串处理的代码 # coding=utf-8 # Author: RyAn Bi name = 'my name is bijibin' print(name.capitalize())#首字母大写 print(name.count('b')) # 字符串中字母b的数量 print(name.center(50,'-')) #打印50个…