title: How to type if elsif on a line inside for for in python
body: <p>I want to get the minimum lines for the code</p>
  
  <p>However I need a condition where i ** 2> num is sending a message with elif, else works but the code gets an error getting the square root</p>
  
  <p>(GoTr)</p>
  
  <pre class="lang-py prettyprint-override"><code>num = int(input('num: ')); [print(f'Raiz({num}) = {i}') for i in range(1, num) if i ** 2 == num]
  </code></pre>