Alfabet Python

Reacties

Hoeft geen type uit de hand:

Python:
  1. alfabet = 'abcdefghijklmnopqrstuvwxyz'

Dit drukt de kleine letters:

Python:
  1. ( chr , range ( 97 , 123 ) ) print kaart (chr, bereik (97, 123))

En nogmaals:

Python:
  1. ( chr , range ( 65 , 91 ) ) print kaart (chr, bereik (65, 91))

Maar je kunt ook rekenen op onze eigen Python (batterijen inbegrepen, na al!)

Python:
  1. import ascii_letters uit string invoer ascii_letters
  2. print ascii_letters

En nogmaals:

Python:
  1. invoer string
  2. . ascii_lowercase print string. ascii_lowercase
  3. . ascii_uppercase print string. ascii_uppercase

    blog comments powered by Disqus

    Português flagItaliano flagCoreano flagChinês (simplificado) flagEnglish flagAlemâo flagFrancês flagEspanhol flag
    Japonês flagÁrabe flagRusso flagHolandês flagBúlgaro flagTcheco flagCroata flagDinamarquês flag
    Finlandês flagHindu flagPolonês flagRomeno flagSueco flagGrego flagNorueguês flag 
    By N2H
    Dolet 96 korting op hosting Dreamhost!
    Gebruik de "PROMO CODE" inertie. LAMP met 20GB aan ruimte en 1TB van de overdracht.

    Dekking

    • Verwante Posten

    Categorieën