私は次のことを達成しようとしています:
Iterate a list
if an element (string) does not have a '$' at the first position
apply a '$' and append the new value to the array
私は次のようなことを試みています:
symbols = ['aol', 'goog', ...]
(symbols.append('$'+val) if '$' != val[0] for val in symbols)
しかし、構文エラーが発生します。どんな助けでも大歓迎です。