List type conversion python -


I have a dataset that PDB debugger tells me that it looks like this;

  set1: [(4.4,), (4.8,), (4.2,), (4.0,), (4.2,), (4.8,), (2.0,), (2.4 ,), (3.0,)]   

I need to be in the format given below;

  set2: [4.4, 4.8, 4.2, 4.0, 4.2, 4.8, 2.0, 2.4, 3.0]   

what type or type of type, 1 And 2 are set and how you are inserted, or else set 1 in Set 2.

I am new to python and it needs to do this in a crowd, so I should not have any time now to know in detail - now any help will be greatly appreciated.

Thank you!

  Set1 = [(4.4,), (4.8,), (4.2,), try: 

set1 is an element of the tuepals, map the result of applying the function passed as a first In this reply, for the collection passed to the Ramter as the second parameter, that function is the one that gives the first element of the tuple.

To do this, use the understanding of a more Python way list:

  set2 = [X [1] set in X1]    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -