Sprache: English Programmiersprache: Python Veröffentlicht von: rainy [nicht registriert] Letzte Änderung: 15.05.2006 Aufrufe: 1908
This function will ask for confirmation in console, accepting yY or Nn or Enter for optional default; if no good answer is given, it'll keep asking.Usage:if yes("Do you want to do this?", 'y'): do_this()if no("Do you want that?", 'n'): do_other()else: do_that()Prompt will look like:Do you want to do this? [Y/n]
Name *
E-Mail (wird nicht angezeigt) *
Website
Kommentar *
Sicherheitscode *