Quote:A) Though both yield the same result, is one way faster than the other?LC is faster.
Quote:B) In the 'real world' of using Python - is it frowned upon to build lists not using the list comprehension feature (assuming execution time is the same)?LC is used everywhere in Python.
There also a functional program way,but LC is looked upon as more pythonic.
Eg:
>>> lst = ['1', '500', '999'] >>> [int(i) for i in lst] [1, 500, 999] # Functional program way >>> list(map(int, lst)) [1, 500, 999]
Quote:At first glance, this seems like a Personal Preference vs Actual Performance battle.Not so much a Performance thing,LC has become a natural part of the Python language.