Browse Source

docs(string_tokenizer_count): fix inaccurate usage section

pull/1782/head
eslopfer 1 year ago
parent
commit
8f93971d9b
  1. 9
      subjects/devops/string_tokenizer_count/README.md

9
subjects/devops/string_tokenizer_count/README.md

@ -10,19 +10,20 @@ Create a file string_tokenizer_count.py that contains a function tokenizer_count
### Usage ### Usage
Here is an example of how to use the function: Here is an example of how to use the function in a test.py script:
```python ```python
string = "This is a test sentence, with various words and 123 numbers!" string = "This is a test sentence, with various words and 123 numbers!"
result = tokenizer_counter(string) result = tokenizer_counter(string)
print(string) print(result)
``` ```
And its output: And its output:
```console ```console
string = "This is a test sentence, with various words and 123 numbers!" $ python3 test.py
result = tokenizer_counter(string) {'123': 1, 'a': 1, 'and': 1, 'is': 1, 'numbers': 1, 'sentence': 1, 'test': 1, 'this': 1, 'various': 1, 'with': 1, 'words': 1}
$
``` ```
### Hints ### Hints

Loading…
Cancel
Save