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 271 views
1 answer 151 views
151 views asked Nov 7, 2018 by avibootz
2 answers 251 views
...