Added Homework 04 - Strings
This commit is contained in:
parent
aad4e226c5
commit
be356ccb59
24 changed files with 315 additions and 0 deletions
18
homework/homework04/strings/stringConstants01.py
Normal file
18
homework/homework04/strings/stringConstants01.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import string
|
||||
|
||||
# See https://docs.python.org/3/library/string.html
|
||||
# These are some pre-defined character variables you can use.
|
||||
|
||||
print(f"string.ascii_letters = {string.ascii_letters}")
|
||||
print(f"string.ascii_lowercase = {string.ascii_lowercase}")
|
||||
print(f"string.ascii_uppercase = {string.ascii_uppercase}")
|
||||
print(f"string.digits = {string.digits}")
|
||||
print(f"string.hexdigits = {string.hexdigits}")
|
||||
print(f"string.octdigits = {string.octdigits}")
|
||||
print(f"string.punctuation = {string.punctuation}")
|
||||
print(f"string.printable = {string.printable}")
|
||||
print(f"string.whitespace = {string.whitespace}")
|
||||
print(f"length of string.whitespace = {len(string.whitespace)}")
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue