From 70247db39329163f602034d08cf70a0fc1246e6a Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Fri, 23 Aug 2019 07:35:47 +0000 Subject: [PATCH] Travis build: 47 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80739364f..475caa3c3 100644 --- a/README.md +++ b/README.md @@ -603,13 +603,13 @@ initialize_2d_list(2, 2, 0) # [[0,0], [0,0]] Initializes a list containing the numbers in the specified range where `start` and `end` are inclusive with their common difference `step`. -Use list comprehension and `range()` to generate a list of the appropriate length, filled with the desired values in the given range. +Use `list` and `range()` to generate a list of the appropriate length, filled with the desired values in the given range. Omit `start` to use the default value of `0`. Omit `step` to use the default value of `1`. ```py def initialize_list_with_range(end, start = 0, step = 1): - return [x for x in range(start, end + 1, step)] + return list(range(start, end + 1, step)) ```