Converting a List Into Float Variables
<p>I'm wanting to take an input as a list but use each variable as a float. Is there a simpler way to make this conversion other than explicitly like I do below, as a list is defined with strings, and I want to, for example, add rather than concatenate:</p>

<pre><code>edges = input("Enter three edges: ").split(", ")  
print("The perimeter is", (float(edges[0]) + float(edges[1]) + float(edges[2])))
</code></pre>

<p>Since you probably want the edges only as numbers, you can convert them early:</p>

<pre><code>edges = [float(edge) for edge in input("Enter three edges: ").split(", ")]
print("The perimeter is", sum(edges))
</code></pre>

<p>Sample run:</p>

<pre><code>Enter three edges: 1.2, 3.4, 5.6
The perimeter is 10.2
</code></pre>

python list python-3.x floating-point