Re: Menu system rewrite update (Aug 1 2002)
On Fri, 2 Aug 2002, Andreas Tille <tillea@rki.de> wrote:
> snipped from http://www.phy.olemiss.edu/~cnlawren/debmenu/parse_menus.py:
Thanks for the snip
> elif section[:11] == 'Apps/System':
Use .startswith, or are you enjoying counting characters?
Like that
>>> "hello".startswith("he")
1
>>> "hello".startswith("hell")
1
>>> "hello".startswith("go to")
0
Sorry for the off-topicness, but lots of people are not familiar with
those really really useful features of Python 2.x, and I thought I'd
pipe up.
Thanks,
M
Reply to: