Python Newbie
Mark Lawrence
breamoreboy at yahoo.co.uk
Sun Feb 24 09:34:37 EST 2013
On 24/02/2013 04:20, Larry Hudson wrote:
> On 02/23/2013 03:46 PM, piterrr.dolinski at gmail.com wrote:
>> Hi all,
>>
> <snip>
>> ... I have discovered today there is no do...while type loop. [Sigh]
>>
> No biggie. This is easily simulated with:
>
> while True:
> ...
> if <exit condition>:
> break
>
> Less easily simulated is the lack of a switch/case structure. This has
> to be done with a less convenient extended if/elif/.../else structure.
Or a dict, there are umpteen recipes showing how to do this.
>
>> Peter
>>
>
> -=- Larry -=-
>
--
Cheers.
Mark Lawrence
More information about the Python-list
mailing list