BaşlayınÜcretsiz Başlayın

Working with the string module

Recently, you've seen several popular modules, including string, which is used to gather specific values, such as all uppercase characters, or format some text.

This can be helpful if you need to check whether text contains specific characters or modify text, such as converting to lowercase.

In this exercise, you'll import the module and access its ascii_lowercase and punctuation attributes.

Bu egzersiz

Intermediate Python for Developers

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Import the string module.
  • Access the module's .ascii_lowercase attribute.
  • Access the module's .punctuation attribute.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import the string module
____ string

# Print all ASCII lowercase characters
print(string.____)

# Print all punctuation
print(string.____)
Kodu Düzenle ve Çalıştır