Respuesta :

Answer:

x_inp = [ '1', '2', '3']

   int_val = [ int(a) for a in x_inp ]

   print("integer: int_val")

y_inp = [ '1.0', '2.0', '3.0']

flo_val = [ float(a) for a in y_inp ]

   print("float: flo_val")

Explanation:

All the items in the arrays x_inp and y_inp are coverted to integer and float data types respectively with the for loop statement, which individually assigns the resolved integer and float values to the memory locations int_val and flo_val respectively.

The output becomes,

integer:

1

2

3

float:

1.0  

2.0

3.0

ACCESS MORE