raw_input|active:|continue|break|

 1 a = "please"
 2 b = "say something:"
 3 c =a+b
 4 m = 0
 5 a = True
 6 while a:
 7     m = int(raw_input(c))
 8     print m+1
 9     if m>11:
10         a = False
11 
12 #please say something:wwwwwww
13 '''
14 python t.py
15 pleasesay something:2
16 3
17 '''
18 '''
19 pleasesay something:2
20 3
21 pleasesay something:2
22 3
23 pleasesay something:3
24 4
25 pleasesay something:6
26 7
27 pleasesay something:11
28 12
29 pleasesay something:12
30 13
31 '''
32 n ="numbers:"
33 nun =90
34 col_nun=[];
35 while nun>11:
36     nun = int(raw_input(n))
37     col_nun.append(nun)
38     if nun==23:
39         bun = int(raw_input(n))
40         print bun
41         continue
42     if nun ==67:
43         break
44 
45 print col_nun
46 '''
47 numbers:23
48 numbers:23
49 23
50 numbers:23
51 numbers:23
52 23
53 numbers:24
54 numbers:12
55 numbers:67
56 [23, 23, 24, 12, 67]
57 '''

猜你喜欢

转载自www.cnblogs.com/yuanjingnan/p/11131752.html