File tree 1 file changed +18
-7
lines changed
1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -115,18 +115,29 @@ while(i < 10):
115
115
# ## Dictionaries
116
116
key- value pairs.
117
117
```python
118
- newDict = {' Google' :100 , ' Facebook' :80 , ' Apple' :90 }
118
+ < dict > = {' Google' :100 , ' Facebook' :80 , ' Apple' :90 }
119
119
120
- newDict [' Amazon' ] = 85 # Adding a key along with the value
120
+ < dict > [' Amazon' ] = 85 # Adding a key along with the value
121
121
122
122
# Accessing the dictionary
123
- for key in newDict :
124
- print (" {key} -> {x} " .format(key = key, x = newDict [key]))
123
+ for key in < dict > :
124
+ print (" {key} -> {x} " .format(key = key, x = < dict > [key]))
125
125
126
- len (newDict) # Find the length of the dictionary
127
- newDist .pop(< key> ) # Removes the item with the specified key name
128
- newDict .copy() # Make a copy of a dictionary
126
+ len (< dict > ) # Find the length of the dictionary
127
+ < dict > .pop(< key> ) # Removes the item with the specified key name
128
+ < dict > .copy() # Make a copy of a dictionary
129
129
```
130
130
A dictionary can also contain many dictionaries, this is called nested dictionaries.
131
131
132
+ # # Third party libraries
133
+
134
+ # ## NLTK
135
+ ```python
136
+ import nltk
137
+
138
+ # Before trying any function download the word list
139
+ nltk.download(' punkt' )
140
+ nltk.download(' averaged_perceptron_tagger' )
141
+ ```
142
+
132
143
You can’t perform that action at this time.
0 commit comments