Skip to content

Commit e6ff3da

Browse files
committed
start index from 0 so as not to miss the first joke
1 parent 87e9519 commit e6ff3da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

joke.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ def getJoke():
77
# return a random joke loaded from the data.json
88
with open('data.json') as data_file:
99
data = json.load(data_file)
10-
return data[randint(1, len(data))]
10+
return data[randint(0, len(data))]

0 commit comments

Comments
 (0)