Jan-22-2019, 04:56 PM
(This post was last modified: Jan-22-2019, 05:11 PM by ichabod801.)
Hi there, I am a new user of python and just want to know if there is anyway to shorten by below code in a way that I can multiply all records with a single value. At the moment I am selecting every single rec and multiplying it individually.
newList = [] for idx,rec in enumerate(tmp): newList.append ((rec[0]*2, rec[1] *2, rec[3] *2, rec[4] *2))