We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6ff3da commit 1b69496Copy full SHA for 1b69496
joke.py
@@ -7,4 +7,4 @@ def getJoke():
7
# return a random joke loaded from the data.json
8
with open('data.json') as data_file:
9
data = json.load(data_file)
10
- return data[randint(0, len(data))]
+ return data[randint(0, len(data) - 1)]
0 commit comments