[1,2,3,4,5,6,7,8,9,10]
[11,12,13,14,15,16,17,18,19,20]
…[91,92,93,94,95,96,97,98.99,100]
按照這樣的格式顯示出來就行了!
上面是編寫的**,結果顯示出來的是這樣的效果:a=
print(a)
for i in range(1,101,1) :
if i == 10 :
print(a)
if i == 20 and i > 10 :
for i1 in range(0,10,1) :
a.pop(i1)
print(a)
if i == 30 and i > 20 :
for i1 in range(0,10,1) :
a.pop(i1)
print(a)
if i == 40 and i > 30:
for i1 in range(0, 10, 1):
a.pop(i1)
print(a)
if i == 50 and i > 40:
for i1 in range(0, 10, 1):
a.pop(i1)
print(a)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20]
[3, 7, 11, 15, 19, 21, 23, 25, 27, 29, 30]
[7, 15, 21, 25, 29, 31, 33, 35, 37, 39, 40]
[15, 25, 31, 35, 39, 41, 43, 45, 47, 49, 50]
分析一下原因:
這裡面我也除錯了第二組[1,3,5,7,9,…]
程式是按照生成的邏輯,按位取數,結果取走了,0,4,8,10,12,14,16,18,沒有按照我預想的取走[0,1,2,3,4,5,6,7,8,9],不知道應該怎麼改動,才能實現我最前面要實現的效果,請高手老師指導一下,萬分感謝!
初學者:德天老師求助!
華為的面試題 ,大家看一下
typedef int pint define pint int 那麼 const pint p p不可更改,但p指向的內容可更改 const pint p p可更改,但是p指向的內容不可更改。上面說的對嗎?答案const pint p1 p1不可更改,但p1指向的內容可更改 const pint ...
DLL中的Forms問題,大家來看一下啊!!
dll中的forms問題,大家來看一下啊!delphi windows sdk api 我在視窗的panel中呼叫了乙個dll檔案中的視窗,呼叫是一切正常的,但要加 panel1.updatecontrolstate視窗才能正常的顯示出來。如果我的dll窗體中用了pagecontrol,問題就出現了...
關於ajax的問題,跟大家分享一下
function onmouseup tablename,itemname else else if cell.column.key expirydate else return false 因為我要動態的去後台判斷當前的狀態,所以用了ajax去取狀態,然後會呼叫cmdrefresh documen...