Python Convert Lines into a list
Question: I use ifconfig command with awk to catch system's ip addresses

    
    
    $ ifconfig  | grep -E 'inet.[0-9]' | awk '{ print $2}'
    
    127.0.0.1
    192.168.8.2
    

How to convert o/p into a list using python ?


Answer: 
    import sys
    list_of_lines = [line.strip() for line in sys.stdin]
    

