Changes between Version 27 and Version 28 of NewbieMistakes
- Timestamp:
- Sep 27, 2006, 8:11:10 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewbieMistakes
v27 v28 210 210 }}} 211 211 212 The way to do it is test for the length of p:212 The way to do it is test for p.count: 213 213 214 214 {{{ … … 218 218 >>> p 219 219 [] 220 >>> len(p) == 0220 >>> p.count() == 0 221 221 True 222 222 }}} … … 243 243 {{{ 244 244 #!python 245 >>> p[ len(p)-1]245 >>> p[p.count()-1] 246 246 <Poll: What is your favourite colour?> 247 247 }}}