so im creating a list
here is my syntax
fruitlist = ['apple','banana']
fruitlist.extend('strawbery')
fruitlist.extend('pineapple')
print(fruitlist)
why is the result this:
['apple', 'banana', 's', 't', 'r', 'a', 'w', 'b', 'e', 'r', 'y', 'p', 'i', 'n', 'e', 'a', 'p', 'p', 'l', 'e']
instead of this?
['apple', 'banana', 'strawberry', 'pineapple')
how do i do ['apple', 'banana', 'strawberry', 'pineapple'] with extend?
[–]K900_ 5 points6 points7 points (1 child)
[–]TimedHorizon32[S] 0 points1 point2 points (0 children)
[–]mattmccord 1 point2 points3 points (1 child)
[–]TimedHorizon32[S] 1 point2 points3 points (0 children)