0

I have the following list

List1 =['4','0','1','k']

How do i make sure that individual elements are combined into one single entity?

Here is the desired output

List1 =['401k']

Ridhima Kumar
  • 151
  • 3
  • 14

1 Answers1

1

Use str.join:

List1 = [''.join(List1)]
Jan Christoph Terasa
  • 5,781
  • 24
  • 34