Remove the element ( ') from the list



  • How can I remove the skirts? ' ' List с = [1,2,3,'a',2,1,2,b,2,'1',1,c] to get с = [1,2,3,a,2,1,2,b,2,1,1,c]



  • In your example, I noticed a transformation. 'a' Total a♪ As I understand, you want to replace the lines with the variables that they have. If I understand correctly, this is an example of this code:

    c = [1, 2, 3, 'a', 2, 1, 2, b, 2, '1', 1, d]
    

    c = list(map(lambda x: eval(str(x)), c))


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2