how to make a field visible if it is populated in a template in django code example

Example 1: delete an element by value from a list if it made of white spaces python

[name for name in starring if name.strip()]

Example 2: How to set the value to be selected of the radio button in mvc

•	Here , employee is an object and from that object we are fetching
	Gender property which is of string type.

@if (employee.Gender == "Male")
        {
            <input type="radio" name="Gender" value="Male" checked="checked" /> 
            <text>Male</text>
        }
        else
        {
            <input type="radio" name="Gender" value="Male" /> 
             <text>Male</text>
        }