diff --git a/README.md b/README.md index bd5f35f..9146592 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Dictionary ```python collections.defaultdict() # Creates a dictionary with default values. dict(zip(keys, values)) # Initiates a dict from two lists. -{k: v for k, v in .iteritems() if k in } # Filters a dict by keys. +{k: v for k, v in .items() if k in } # Filters a dict by keys. ``` ### Counter @@ -138,7 +138,7 @@ type() # / / ... ``` ```python import numbers -isinstance(, numbers.Number) +isinstance(, numbers.Number) # numbers.Integral, numbers.Real ``` @@ -404,10 +404,19 @@ def read_file(filename): ### Write to File ```python def write_to_file(filename, text): - with open(filename, 'w', enconding='utf-8') as file: + with open(filename, 'w', encoding='utf-8') as file: file.write(text) ``` +### Path +```python +imort os +os.path.exists() +os.path.isfile() +os.path.isdir() +os.listdir() +``` + ### Execute Command ```python import os