New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Why doesn’t this code print [7] ?
empty_list = [] x = empty_list.append(7) print(x)
1 Answer
+ 1
append() function will add the passed value to the end of list.
empty_list = [] x = empty_list.append(7) print(x)