How to extend a list of characters by appending string char by char in Python

1 Answer

0 votes
lst = ["a", "b", "c", "d"]

s = "Python"

lst.extend(s)


print(lst)


'''
run:

['a', 'b', 'c', 'd', 'P', 'y', 't', 'h', 'o', 'n']

'''

 



answered Dec 4, 2017 by avibootz

Related questions

2 answers 285 views
1 answer 159 views
159 views asked Nov 7, 2018 by avibootz
2 answers 253 views
...